Compare commits

...

87 Commits

Author SHA1 Message Date
a9b2e5d19d Merge pull request 'prep v8.2.1' (#910) from prep-v8.2.1 into main
Reviewed-on: #910
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2025-02-07 15:51:59 +01:00
64e9e77033 prep v8.2.1 2025-02-07 14:51:00 +01:00
b223a363ca Merge pull request 'Use BPX batt dummy' (#909) from em-update-bpx-dummy into main
Reviewed-on: #909
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2025-02-07 14:48:41 +01:00
c158b379c0 smaller fixes 2025-02-07 14:48:05 +01:00
a9204fb042 Fix EM build: Use BPX Batt dummy 2025-02-06 14:31:23 +01:00
ea6dbb6454 Merge pull request 'prep v8.2.0' (#907) from prep-release into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #907
2024-06-26 15:49:20 +02:00
bfa9a3c1fe prep v8.2.0
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main Build queued...
2024-06-26 15:45:20 +02:00
0166ebb185 Merge pull request 'Different Rot Rate Source for Detumble' (#902) from use-different-rot-rate-for-detumble into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #902
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2024-06-26 15:36:31 +02:00
2ba1d0f629 Merge remote-tracking branch 'origin/main' into use-different-rot-rate-for-detumble
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-06-26 13:34:14 +02:00
ca14429a62 Merge pull request 'Adjust dataset frequency' (#906) from reduce-dataset-freq into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #906
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2024-06-26 13:30:34 +02:00
00ce2fe611 changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-06-25 13:45:03 +02:00
64ec2ffd84 acs ctrl controller datasets to 30s at or below idle and 10s above idle
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-06-25 13:29:32 +02:00
30bb5d1ac7 str solution dataset to 30s 2024-06-25 13:17:43 +02:00
640e316e5e rw status dataset to 30s 2024-06-25 13:13:09 +02:00
fe4ef398ed gnss ctrl core dataset to 60s 2024-06-25 13:10:13 +02:00
09f282cfd5 mtq datasets to 60s 2024-06-25 13:09:02 +02:00
709be2cd24 acs ctrl sensor datasets to 60s 2024-06-25 13:05:50 +02:00
54e4d27fe1 this is cleaner
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-06-24 13:26:56 +02:00
ce7d1441de whoopsies
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-06-24 13:19:25 +02:00
6727950eac Merge branch 'main' into use-different-rot-rate-for-detumble
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-06-24 11:23:56 +02:00
5c951f3e49 Merge pull request 'might be an important fix' (#904) from possible-fix-mpsoc-take-pic into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #904
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2024-06-24 11:23:09 +02:00
c65ad4ab4f Merge branch 'main' into possible-fix-mpsoc-take-pic 2024-06-24 11:22:47 +02:00
8da305b247 changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-06-24 11:18:49 +02:00
1731b21953 set quest to invalid if sun vector and mgm vector nearly align 2024-06-24 11:02:54 +02:00
4b99be7316 Merge branch 'main' into use-different-rot-rate-for-detumble 2024-06-24 10:59:32 +02:00
bfcd149574 Merge pull request 'SUS Ass B-Side as Nom' (#905) from change-sus-ass-to-b-side into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #905
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2024-06-20 10:55:49 +02:00
90701a0723 Merge branch 'main' into change-sus-ass-to-b-side
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-06-20 09:15:00 +02:00
1a9a054567 changelog 2024-06-20 09:10:50 +02:00
511f7275f2 sus ass b-side as nominal 2024-06-20 09:10:43 +02:00
80ce299d37 Merge pull request 'Use STR for MEKF as default' (#899) from allow-mekf-str into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #899
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2024-06-20 09:10:05 +02:00
6782b4394b Merge remote-tracking branch 'origin/main' into possible-fix-mpsoc-take-pic
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-06-17 16:12:12 +02:00
a35b28fc57 might be an important fix
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-06-17 16:09:55 +02:00
8034982067 and that one
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-06-12 17:04:13 +02:00
e44f1974cd missed that one
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2024-06-12 16:53:35 +02:00
b47e8b1ddd fix enum
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2024-06-12 16:45:33 +02:00
e305d77b32 changelog
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2024-06-12 16:34:00 +02:00
abbbb0cabb make detumble relevant rotational rate always observable 2024-06-12 16:32:47 +02:00
f19b129609 changelog
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-06-10 15:51:10 +02:00
f2d7f32952 changed source 2024-06-10 15:50:47 +02:00
e267b69045 Merge branch 'main' into allow-mekf-str
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-06-10 15:36:04 +02:00
60922ccc0d Merge pull request 'prepare patch release' (#901) from prep-patch-release into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #901
2024-06-05 13:29:59 +02:00
3ec0509bd4 prepare patch release
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
2024-06-05 13:28:08 +02:00
a73c36c237 Merge pull request 'MPSoC Update Retry Logic' (#900) from supv-retry-logic into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #900
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2024-06-05 13:27:18 +02:00
5dd0c2a5cb let's not do that for now..
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-06-05 12:47:17 +02:00
1f8dc67922 some minor improvements
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-06-05 12:36:31 +02:00
e43a86432b start adding re-try logic for SUPV
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2024-06-04 15:10:54 +02:00
585c49780f changelog
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-06-04 11:25:07 +02:00
1429aa56a4 enable use of STR for MEKF by default 2024-06-04 11:23:50 +02:00
467ee0028a Merge pull request 'PLOC SUPV bugfix' (#898) from ploc-supv-bugfix into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #898
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2024-05-29 10:38:15 +02:00
98a92a6b88 Merge remote-tracking branch 'origin/main' into ploc-supv-bugfix
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build queued...
2024-05-29 10:13:52 +02:00
e1f2514596 Merge pull request 'Fix MEKF Inits' (#896) from fix-mekf-inits into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #896
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2024-05-29 10:12:35 +02:00
f255feb819 Merge remote-tracking branch 'origin/main' into fix-mekf-inits 2024-05-29 10:11:53 +02:00
6d27da4939 Merge pull request 'small fix for MPSoC transition failure' (#897) from transition-failure-fix into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #897
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2024-05-29 10:11:01 +02:00
a3ac2505fe small tweak
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-05-28 15:38:16 +02:00
6350e0db0a changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-05-28 15:36:49 +02:00
db9e83cbc8 PLOC SUPV bugfix
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-05-28 15:33:13 +02:00
42ae9eafb7 bump tmtc
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-05-23 14:45:18 +02:00
0475ab872d changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-05-23 14:23:16 +02:00
225d037c66 small fix for MPSoC transition failure
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
2024-05-23 14:22:07 +02:00
aa5a148800 changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-05-15 11:07:46 +02:00
4720ab9a35 corrected str sigma
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-05-15 11:07:12 +02:00
ba219fbe7d changelog
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-05-15 10:05:32 +02:00
32271a98ff go home compiler, you're drunk
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
2024-05-15 10:04:04 +02:00
6025ea5663 fixed ub with initalization 2024-05-14 15:35:20 +02:00
5af43ca29b Merge pull request 'prep v8.0.0' (#895) from prep_v8.0.0 into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #895
2024-05-13 14:19:59 +02:00
822df9658f prep v8.0.0
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-main Build started...
2024-05-13 14:08:35 +02:00
765e3d6b5b Merge pull request 'MPSoC Fixes' (#894) from mpsoc-fixes into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #894
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2024-05-13 14:03:11 +02:00
0b3c928886 combining those is acutally problematic..
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-05-08 11:11:21 +02:00
73279a0bf3 minor fix for periodic HK generation
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2024-05-08 10:54:24 +02:00
4559d24c62 changelog
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2024-05-08 10:04:34 +02:00
b54f8e7738 some fixes for MPSoC 2024-05-08 10:03:32 +02:00
6bb12f28a1 Merge pull request 'MPSoC Overhaul' (#892) from mpsoc-overhaul into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #892
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2024-05-06 14:20:46 +02:00
7e8d995b52 changelog and tmtc 2024-05-06 14:20:13 +02:00
215f2189a6 better name for split file command
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build queued...
2024-05-06 14:17:25 +02:00
8103b2fa0d events
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-05-06 13:48:32 +02:00
b579cd86c1 make marius extremely happy
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-05-06 13:30:28 +02:00
4fdec7a74c impl proper NORMAL mode for MPSoC
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-05-06 13:19:15 +02:00
744a94704c removed TODOs which are done
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-05-02 15:42:14 +02:00
f7f14ff021 Merge branch 'main' into mpsoc-overhaul
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-04-30 15:57:34 +02:00
fe729f1df0 Merge pull request 'Fix Target Rotation Rate' (#893) from tgt-rot-rate-fix into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #893
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2024-04-30 15:52:05 +02:00
7734d1066a Merge branch 'main' into tgt-rot-rate-fix 2024-04-30 15:51:39 +02:00
4a0acbf158 further reduce printout
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-04-30 15:37:53 +02:00
65476f4c98 reduce printouts
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-04-30 15:18:15 +02:00
a6ce06e3f5 Merge branch 'main' into tgt-rot-rate-fix
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-04-29 11:47:07 +02:00
75070b5e66 i am smart
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-04-29 10:42:52 +02:00
26341743a8 changelog
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2024-04-29 10:26:12 +02:00
7c10f4b1cd fix calculation of target rotation 2024-04-29 10:24:53 +02:00
55 changed files with 537 additions and 235 deletions

View File

@@ -16,9 +16,81 @@ will consitute of a breaking change warranting a new major release:
# [unreleased] # [unreleased]
# [v8.2.1] 2025-02-07
Patch release with EM changes only.
## Changed ## Changed
- Reworked MPSoC handler to be compatible to new MPSoC software image and use - BPX battery is not added anymore for EM build, dummy is used by default now.
## Fixed
- Small fix for `q7s-cp.py` script: Add `-O` argument.
# [v8.2.0] 2024-06-26
## Changed
- STR quaternions are now used by the `MEKF` by default
- Changed nominal `SUS Assembly` side to `B Side`.
- Changed source for state machine of detumbling to SUS and MGM only.
- Changed `FusedRotRateData` dataset to always display rotation rate from SUS and MGM.
- Solution from `QUEST` will be set to invalid if sun vector and magnetic field vector are too close
to each other.
- Changed collection intervals of dataset collection
- `GPS Controller`: `GPS Set` to 60s
- `MTQ Handler`: `HK with Torque`, `HK without Torque` to 60s
- `RW Handler`: `Status Set` to 30s
- `STR Handler`: `Solution Set` to 30s
- `ACS Controller`: `MGM Sensor`, `MGM Processed`, `SUS Sensor`, `SUS Processed`, `GYR Sensor`,
`GPS Processed` to 60s
- `ACS Controller` at or below `IDLE`: `CTRL Values`, `ACT Commands`, `Attitude Estimation`,
`Fused Rotation Rate` to 30s
- `ACS Controller` above `IDLE`: `CTRL Values`, `ACT Commands`, `Attitude Estimation`,
`Fused Rotation Rate` to 10s
## Fixed
- Added null termination for PLOC MPSoC image taking command which could possibly lead to
default target filenames.
# [v8.1.1] 2024-06-05
## Added
- PLOC SUPV MPSoC update re-try logic for the `WRITE_MEMORY` command. These packets form > 98%
of all packets required for a software update, but the update mechanism is not tolerant against
occasional glitches on the RS485 communication to the PLOC SUPV. A simple re-try mechanism which
tries to re-attempt packet handling up to three times for those packets is introduced.
# [v8.1.0] 2024-05-29
## Fixed
- Small fix for transition failure handling of the MPSoC when the `START_MPSOC` action command
to the supervisor fails.
- Fixed inits of arrays within the `MEKF` not being zeros.
- Important bugfix for PLOC SUPV: The SUPV previously was able to steal packets from the special
communication helper, for example during software updates.
- Corrected sigma of STR for `MEKF`.
## Added
- Added new command to cancel the PLOC SUPV special communication helper.
# [v8.0.0] 2024-05-13
- `eive-tmtc` v7.0.0
## Fixed
- Fixed calculation for target rotation rate during pointing modes.
- Possible fix for MPSoC file read algorithm.
## Changed
- Reworked MPSoC handler to be compatible to new MPSoC software image and use
new device handler base class. This should increase the reliability of the communication new device handler base class. This should increase the reliability of the communication
significantly. significantly.
- MPSoC device modes IDLE, SNAPSHOT and REPLAY are now modelled using submodes. - MPSoC device modes IDLE, SNAPSHOT and REPLAY are now modelled using submodes.
@@ -32,6 +104,8 @@ will consitute of a breaking change warranting a new major release:
# [v7.8.1] 2024-04-11 # [v7.8.1] 2024-04-11
## Fixed
- Reverted fix for wrong order in quaternion multiplication for computation of the error quaternion. - Reverted fix for wrong order in quaternion multiplication for computation of the error quaternion.
# [v7.8.0] 2024-04-10 # [v7.8.0] 2024-04-10
@@ -42,7 +116,7 @@ will consitute of a breaking change warranting a new major release:
- All pointing laws are now allowed to use the `MEKF` per default. - All pointing laws are now allowed to use the `MEKF` per default.
- Changed limits in `PWR Controller`. - Changed limits in `PWR Controller`.
- PUS time service: Now dumps the time before and after relative timeshift or setting absolute time - PUS time service: Now dumps the time before and after relative timeshift or setting absolute time
- The `GPS Controller` does not set itself to `OFF` anymore, if it has not detected a valid fix for - The `GPS Controller` does not set itself to `OFF` anymore, if it has not detected a valid fix for
some time. Instead it attempts to reset both GNSS devices once. some time. Instead it attempts to reset both GNSS devices once.
- The maximum time to reach a fix is shortened from 30min to 15min. - The maximum time to reach a fix is shortened from 30min to 15min.
- The time the reset pin of the GNSS devices is pulled is prolonged from 5ms to 10s. - The time the reset pin of the GNSS devices is pulled is prolonged from 5ms to 10s.
@@ -51,7 +125,7 @@ will consitute of a breaking change warranting a new major release:
of the controller is changed. As arguments it now displays the new fix and the numer of fix changes of the controller is changed. As arguments it now displays the new fix and the numer of fix changes
missed. missed.
- The number of satellites seen and used is reset to 0, in case they are set to invalid. - The number of satellites seen and used is reset to 0, in case they are set to invalid.
- Altitude, latitude and longitude messages are not checked anymore, in case the mode message was - Altitude, latitude and longitude messages are not checked anymore, in case the mode message was
already invalid. already invalid.
## Added ## Added
@@ -265,7 +339,7 @@ will consitute of a breaking change warranting a new major release:
- `ACS Controller` now has the function `performAttitudeControl` which is called prior to passing - `ACS Controller` now has the function `performAttitudeControl` which is called prior to passing
on to the relevant mode functions. It handles all telemetry relevant functions, which were on to the relevant mode functions. It handles all telemetry relevant functions, which were
always called, regardless of the mode. always called, regardless of the mode.
## Added ## Added
- Higher ACS modes can now be entered without a running `MEKF`. Higher modes will collect their - Higher ACS modes can now be entered without a running `MEKF`. Higher modes will collect their

View File

@@ -10,8 +10,8 @@
cmake_minimum_required(VERSION 3.13) cmake_minimum_required(VERSION 3.13)
set(OBSW_VERSION_MAJOR 8) set(OBSW_VERSION_MAJOR 8)
set(OBSW_VERSION_MINOR 0) set(OBSW_VERSION_MINOR 2)
set(OBSW_VERSION_REVISION 0) set(OBSW_VERSION_REVISION 1)
# set(CMAKE_VERBOSE TRUE) # set(CMAKE_VERBOSE TRUE)
@@ -70,13 +70,13 @@ if(EIVE_Q7S_EM)
set(OBSW_Q7S_EM set(OBSW_Q7S_EM
1 1
CACHE STRING "Q7S EM configuration") CACHE STRING "Q7S EM configuration")
set(INIT_VAL 0) set(OBSW_Q7S_FM 0)
set(OBSW_STAR_TRACKER_GROUND_CONFIG 1) set(OBSW_STAR_TRACKER_GROUND_CONFIG 1)
else() else()
set(OBSW_Q7S_EM set(OBSW_Q7S_EM
0 0
CACHE STRING "Q7S EM configuration") CACHE STRING "Q7S EM configuration")
set(INIT_VAL 1) set(OBSW_Q7S_FM 1)
set(OBSW_STAR_TRACKER_GROUND_CONFIG 0) set(OBSW_STAR_TRACKER_GROUND_CONFIG 0)
endif() endif()
@@ -87,19 +87,19 @@ set(OBSW_ADD_TMTC_UDP_SERVER
0 0
CACHE STRING "Add UDP TMTC Server") CACHE STRING "Add UDP TMTC Server")
set(OBSW_ADD_MGT set(OBSW_ADD_MGT
${INIT_VAL} ${OBSW_Q7S_FM}
CACHE STRING "Add MGT module") CACHE STRING "Add MGT module")
set(OBSW_ADD_BPX_BATTERY_HANDLER set(OBSW_ADD_BPX_BATTERY_HANDLER
1 ${OBSW_Q7S_FM}
CACHE STRING "Add BPX battery module") CACHE STRING "Add BPX battery module")
set(OBSW_ADD_STAR_TRACKER set(OBSW_ADD_STAR_TRACKER
1 1
CACHE STRING "Add Startracker module") CACHE STRING "Add Startracker module")
set(OBSW_ADD_SUN_SENSORS set(OBSW_ADD_SUN_SENSORS
${INIT_VAL} ${OBSW_Q7S_FM}
CACHE STRING "Add sun sensor module") CACHE STRING "Add sun sensor module")
set(OBSW_ADD_SUS_BOARD_ASS set(OBSW_ADD_SUS_BOARD_ASS
${INIT_VAL} ${OBSW_Q7S_FM}
CACHE STRING "Add sun sensor board assembly") CACHE STRING "Add sun sensor board assembly")
set(OBSW_ADD_THERMAL_TEMP_INSERTER set(OBSW_ADD_THERMAL_TEMP_INSERTER
${OBSW_Q7S_EM} ${OBSW_Q7S_EM}
@@ -108,7 +108,7 @@ set(OBSW_ADD_ACS_BOARD
1 1
CACHE STRING "Add ACS board module") CACHE STRING "Add ACS board module")
set(OBSW_ADD_GPS_CTRL set(OBSW_ADD_GPS_CTRL
${INIT_VAL} ${OBSW_Q7S_FM}
CACHE STRING "Add GPS controllers") CACHE STRING "Add GPS controllers")
set(OBSW_ADD_CCSDS_IP_CORES set(OBSW_ADD_CCSDS_IP_CORES
1 1
@@ -129,19 +129,19 @@ set(OBSW_ADD_PLOC_SUPERVISOR
1 1
CACHE STRING "Add PLOC supervisor handler") CACHE STRING "Add PLOC supervisor handler")
set(OBSW_ADD_SA_DEPL set(OBSW_ADD_SA_DEPL
${INIT_VAL} ${OBSW_Q7S_FM}
CACHE STRING "Add SA deployment handler") CACHE STRING "Add SA deployment handler")
set(OBSW_ADD_PLOC_MPSOC set(OBSW_ADD_PLOC_MPSOC
1 1
CACHE STRING "Add MPSoC handler") CACHE STRING "Add MPSoC handler")
set(OBSW_ADD_ACS_CTRL set(OBSW_ADD_ACS_CTRL
${INIT_VAL} ${OBSW_Q7S_FM}
CACHE STRING "Add ACS controller") CACHE STRING "Add ACS controller")
set(OBSW_ADD_RTD_DEVICES set(OBSW_ADD_RTD_DEVICES
${INIT_VAL} ${OBSW_Q7S_FM}
CACHE STRING "Add RTD devices") CACHE STRING "Add RTD devices")
set(OBSW_ADD_RAD_SENSORS set(OBSW_ADD_RAD_SENSORS
${INIT_VAL} ${OBSW_Q7S_FM}
CACHE STRING "Add Rad Sensor module") CACHE STRING "Add Rad Sensor module")
set(OBSW_ADD_PL_PCDU set(OBSW_ADD_PL_PCDU
1 1
@@ -156,10 +156,10 @@ set(OBSW_ADD_GOMSPACE_PCDU
1 1
CACHE STRING "Add GomSpace PCDU modules") CACHE STRING "Add GomSpace PCDU modules")
set(OBSW_ADD_GOMSPACE_ACU set(OBSW_ADD_GOMSPACE_ACU
${INIT_VAL} ${OBSW_Q7S_FM}
CACHE STRING "Add GomSpace ACU submodule") CACHE STRING "Add GomSpace ACU submodule")
set(OBSW_ADD_RW set(OBSW_ADD_RW
${INIT_VAL} ${OBSW_Q7S_FM}
CACHE STRING "Add RW modules") CACHE STRING "Add RW modules")
set(OBSW_ADD_SCEX_DEVICE set(OBSW_ADD_SCEX_DEVICE
1 1

View File

@@ -1,7 +1,7 @@
/** /**
* @brief Auto-generated event translation file. Contains 324 translations. * @brief Auto-generated event translation file. Contains 325 translations.
* @details * @details
* Generated on: 2024-04-17 11:22:10 * Generated on: 2024-05-06 13:47:38
*/ */
#include "translateEvents.h" #include "translateEvents.h"
@@ -142,6 +142,7 @@ const char *MPSOC_HANDLER_SEQUENCE_COUNT_MISMATCH_STRING = "MPSOC_HANDLER_SEQUEN
const char *MPSOC_SHUTDOWN_FAILED_STRING = "MPSOC_SHUTDOWN_FAILED"; const char *MPSOC_SHUTDOWN_FAILED_STRING = "MPSOC_SHUTDOWN_FAILED";
const char *SUPV_NOT_ON_STRING = "SUPV_NOT_ON"; const char *SUPV_NOT_ON_STRING = "SUPV_NOT_ON";
const char *SUPV_REPLY_TIMEOUT_STRING = "SUPV_REPLY_TIMEOUT"; const char *SUPV_REPLY_TIMEOUT_STRING = "SUPV_REPLY_TIMEOUT";
const char *CAM_MUST_BE_ON_FOR_SNAPSHOT_MODE_STRING = "CAM_MUST_BE_ON_FOR_SNAPSHOT_MODE";
const char *SELF_TEST_I2C_FAILURE_STRING = "SELF_TEST_I2C_FAILURE"; const char *SELF_TEST_I2C_FAILURE_STRING = "SELF_TEST_I2C_FAILURE";
const char *SELF_TEST_SPI_FAILURE_STRING = "SELF_TEST_SPI_FAILURE"; const char *SELF_TEST_SPI_FAILURE_STRING = "SELF_TEST_SPI_FAILURE";
const char *SELF_TEST_ADC_FAILURE_STRING = "SELF_TEST_ADC_FAILURE"; const char *SELF_TEST_ADC_FAILURE_STRING = "SELF_TEST_ADC_FAILURE";
@@ -606,6 +607,8 @@ const char *translateEvents(Event event) {
return SUPV_NOT_ON_STRING; return SUPV_NOT_ON_STRING;
case (11608): case (11608):
return SUPV_REPLY_TIMEOUT_STRING; return SUPV_REPLY_TIMEOUT_STRING;
case (11609):
return CAM_MUST_BE_ON_FOR_SNAPSHOT_MODE_STRING;
case (11701): case (11701):
return SELF_TEST_I2C_FAILURE_STRING; return SELF_TEST_I2C_FAILURE_STRING;
case (11702): case (11702):

View File

@@ -2,7 +2,7 @@
* @brief Auto-generated object translation file. * @brief Auto-generated object translation file.
* @details * @details
* Contains 176 translations. * Contains 176 translations.
* Generated on: 2024-04-17 11:22:10 * Generated on: 2024-05-06 13:47:38
*/ */
#include "translateObjects.h" #include "translateObjects.h"

View File

@@ -117,10 +117,11 @@ void ObjectFactory::produce(void* args) {
#if OBSW_ADD_BPX_BATTERY_HANDLER == 1 #if OBSW_ADD_BPX_BATTERY_HANDLER == 1
createBpxBatteryComponent(enableHkSets, battAndImtqI2cDev); createBpxBatteryComponent(enableHkSets, battAndImtqI2cDev);
#endif #endif
createPowerController(true, enableHkSets);
dummy::createDummies(dummyCfg, *pwrSwitcher, gpioComIF, enableHkSets); dummy::createDummies(dummyCfg, *pwrSwitcher, gpioComIF, enableHkSets);
createPowerController(true, enableHkSets);
new CoreController(objects::CORE_CONTROLLER, enableHkSets); new CoreController(objects::CORE_CONTROLLER, enableHkSets);
auto* stackHandler = new Stack5VHandler(*pwrSwitcher); auto* stackHandler = new Stack5VHandler(*pwrSwitcher);
@@ -143,10 +144,6 @@ void ObjectFactory::produce(void* args) {
createImtqComponents(pwrSwitcher, enableHkSets, battAndImtqI2cDev); createImtqComponents(pwrSwitcher, enableHkSets, battAndImtqI2cDev);
#endif #endif
#if OBSW_ADD_SYRLINKS == 1
createSyrlinksComponents(pwrSwitcher);
#endif /* OBSW_ADD_SYRLINKS == 1 */
#if OBSW_ADD_RW == 1 #if OBSW_ADD_RW == 1
createReactionWheelComponents(gpioComIF, pwrSwitcher); createReactionWheelComponents(gpioComIF, pwrSwitcher);
#endif #endif
@@ -155,6 +152,10 @@ void ObjectFactory::produce(void* args) {
createStrComponents(pwrSwitcher, *SdCardManager::instance()); createStrComponents(pwrSwitcher, *SdCardManager::instance());
#endif /* OBSW_ADD_STAR_TRACKER == 1 */ #endif /* OBSW_ADD_STAR_TRACKER == 1 */
#if OBSW_ADD_SYRLINKS == 1
createSyrlinksComponents(pwrSwitcher);
#endif
#if OBSW_ADD_PL_PCDU == 1 #if OBSW_ADD_PL_PCDU == 1
createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher, *stackHandler); createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher, *stackHandler);
#endif #endif

View File

@@ -65,6 +65,7 @@
#include "linux/payload/PlocMpsocSpecialComHelper.h" #include "linux/payload/PlocMpsocSpecialComHelper.h"
#include "linux/payload/SerialConfig.h" #include "linux/payload/SerialConfig.h"
#include "mission/config/configfile.h" #include "mission/config/configfile.h"
#include "mission/power/defs.h"
#include "mission/system/acs/AcsBoardFdir.h" #include "mission/system/acs/AcsBoardFdir.h"
#include "mission/system/acs/AcsSubsystem.h" #include "mission/system/acs/AcsSubsystem.h"
#include "mission/system/acs/RwAssembly.h" #include "mission/system/acs/RwAssembly.h"
@@ -597,14 +598,13 @@ void ObjectFactory::createSolarArrayDeploymentComponents(PowerSwitchIF& pwrSwitc
} }
void ObjectFactory::createSyrlinksComponents(PowerSwitchIF* pwrSwitcher) { void ObjectFactory::createSyrlinksComponents(PowerSwitchIF* pwrSwitcher) {
new SyrlinksComHandler(objects::SYRLINKS_COM_HANDLER);
auto* syrlinksAssy = new SyrlinksAssembly(objects::SYRLINKS_ASSY);
syrlinksAssy->connectModeTreeParent(satsystem::com::SUBSYSTEM);
auto* syrlinksUartCookie = auto* syrlinksUartCookie =
new SerialCookie(objects::SYRLINKS_HANDLER, q7s::UART_SYRLINKS_DEV, serial::SYRLINKS_BAUD, new SerialCookie(objects::SYRLINKS_HANDLER, q7s::UART_SYRLINKS_DEV, serial::SYRLINKS_BAUD,
syrlinks::MAX_REPLY_SIZE, UartModes::NON_CANONICAL); syrlinks::MAX_REPLY_SIZE, UartModes::NON_CANONICAL);
syrlinksUartCookie->setParityEven(); syrlinksUartCookie->setParityEven();
new SyrlinksComHandler(objects::SYRLINKS_COM_HANDLER);
auto* syrlinksAssy = new SyrlinksAssembly(objects::SYRLINKS_ASSY);
syrlinksAssy->connectModeTreeParent(satsystem::com::SUBSYSTEM);
auto syrlinksFdir = new SyrlinksFdir(objects::SYRLINKS_HANDLER); auto syrlinksFdir = new SyrlinksFdir(objects::SYRLINKS_HANDLER);
auto syrlinksHandler = auto syrlinksHandler =
new SyrlinksHandler(objects::SYRLINKS_HANDLER, objects::SYRLINKS_COM_HANDLER, new SyrlinksHandler(objects::SYRLINKS_HANDLER, objects::SYRLINKS_COM_HANDLER,
@@ -635,9 +635,9 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF, PowerSwit
auto specialComHelper = auto specialComHelper =
new PlocMpsocSpecialComHelper(objects::PLOC_MPSOC_HELPER, *mpsocCommunication); new PlocMpsocSpecialComHelper(objects::PLOC_MPSOC_HELPER, *mpsocCommunication);
DhbConfig dhbConf(objects::PLOC_MPSOC_HANDLER); DhbConfig dhbConf(objects::PLOC_MPSOC_HANDLER);
auto* mpsocHandler = new FreshMpsocHandler(dhbConf, *mpsocCommunication, *specialComHelper, auto* mpsocHandler = new FreshMpsocHandler(
Gpio(gpioIds::ENABLE_MPSOC_UART, gpioComIF), dhbConf, *mpsocCommunication, *specialComHelper, Gpio(gpioIds::ENABLE_MPSOC_UART, gpioComIF),
objects::PLOC_SUPERVISOR_HANDLER); objects::PLOC_SUPERVISOR_HANDLER, pwrSwitcher, power::PDU2_CH8_PAYLOAD_CAMERA);
mpsocHandler->connectModeTreeParent(satsystem::payload::SUBSYSTEM); mpsocHandler->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
#endif /* OBSW_ADD_PLOC_MPSOC == 1 */ #endif /* OBSW_ADD_PLOC_MPSOC == 1 */
#if OBSW_ADD_PLOC_SUPERVISOR == 1 #if OBSW_ADD_PLOC_SUPERVISOR == 1
@@ -839,7 +839,7 @@ ReturnValue_t ObjectFactory::createCcsdsComponents(CcsdsComponentArgs& args) {
Levels::LOW); Levels::LOW);
gpioCookiePdec->addGpio(gpioIds::PDEC_RESET, gpio); gpioCookiePdec->addGpio(gpioIds::PDEC_RESET, gpio);
gpioChecker(args.gpioComIF.addGpios(gpioCookiePdec), "PDEC"); gpioChecker(args.gpioComIF.addGpios(gpioCookiePdec), "PDEC");
struct UioNames uioNames {}; struct UioNames uioNames{};
uioNames.configMemory = q7s::UIO_PDEC_CONFIG_MEMORY; uioNames.configMemory = q7s::UIO_PDEC_CONFIG_MEMORY;
uioNames.ramMemory = q7s::UIO_PDEC_RAM; uioNames.ramMemory = q7s::UIO_PDEC_RAM;
uioNames.registers = q7s::UIO_PDEC_REGISTERS; uioNames.registers = q7s::UIO_PDEC_REGISTERS;

View File

@@ -10,7 +10,9 @@
int simple::simple() { int simple::simple() {
std::cout << "-- Q7S Simple Application --" << std::endl; std::cout << "-- Q7S Simple Application --" << std::endl;
#if Q7S_SIMPLE_ADD_FILE_SYSTEM_TEST == 1 #if Q7S_SIMPLE_ADD_FILE_SYSTEM_TEST == 1
{ FileSystemTest fileSystemTest; } {
FileSystemTest fileSystemTest;
}
#endif #endif
#if TE0720_GPIO_TEST #if TE0720_GPIO_TEST

54
dummies/BatteryDummy.cpp Normal file
View File

@@ -0,0 +1,54 @@
#include "BatteryDummy.h"
BatteryDummy::BatteryDummy(DhbConfig cfg)
: FreshDeviceHandlerBase(cfg), cfgSet(this), hkSet(this) {}
void BatteryDummy::performDeviceOperation(uint8_t opCode) {}
LocalPoolDataSetBase* BatteryDummy::getDataSetHandle(sid_t sid) {
if (sid == hkSet.getSid()) {
return &hkSet;
}
if (sid == cfgSet.getSid()) {
return &cfgSet;
}
return nullptr;
}
ReturnValue_t BatteryDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
LocalDataPoolManager& poolManager) {
localDataPoolMap.emplace(bpxBat::BATT_TEMP_1, &battTemp1);
localDataPoolMap.emplace(bpxBat::BATT_TEMP_2, &battTemp2);
localDataPoolMap.emplace(bpxBat::BATT_TEMP_3, &battTemp3);
localDataPoolMap.emplace(bpxBat::BATT_TEMP_4, &battTemp4);
localDataPoolMap.emplace(bpxBat::CHARGE_CURRENT, &chargeCurrent);
localDataPoolMap.emplace(bpxBat::DISCHARGE_CURRENT, &dischargeCurrent);
localDataPoolMap.emplace(bpxBat::HEATER_CURRENT, &heaterCurrent);
localDataPoolMap.emplace(bpxBat::BATT_VOLTAGE, &battVolt);
localDataPoolMap.emplace(bpxBat::REBOOT_COUNTER, &rebootCounter);
localDataPoolMap.emplace(bpxBat::BOOTCAUSE, &bootCause);
localDataPoolMap.emplace(bpxBat::BATTERY_HEATER_MODE, &battheatMode);
localDataPoolMap.emplace(bpxBat::BATTHEAT_LOW_LIMIT, &battheatLow);
localDataPoolMap.emplace(bpxBat::BATTHEAT_HIGH_LIMIT, &battheatHigh);
poolManager.subscribeForRegularPeriodicPacket(
subdp::RegularHkPeriodicParams(hkSet.getSid(), true, 20.0));
poolManager.subscribeForRegularPeriodicPacket(
subdp::RegularHkPeriodicParams(cfgSet.getSid(), false, 30.0));
return returnvalue::OK;
}
ReturnValue_t BatteryDummy::checkModeCommand(Mode_t mode, Submode_t submode,
uint32_t* msToReachTheMode) {
return returnvalue::OK;
}
ReturnValue_t BatteryDummy::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t* data, size_t size) {
return returnvalue::OK;
}
ReturnValue_t BatteryDummy::handleCommandMessage(CommandMessage* message) {
return returnvalue::FAILED;
}

52
dummies/BatteryDummy.h Normal file
View File

@@ -0,0 +1,52 @@
#pragma once
#include "fsfw/devicehandlers/FreshDeviceHandlerBase.h"
#include "mission/power/bpxBattDefs.h"
/// @brief
class BatteryDummy : public FreshDeviceHandlerBase {
public:
BatteryDummy(DhbConfig cfg);
private:
/**
* Periodic helper executed function, implemented by child class.
*/
void performDeviceOperation(uint8_t opCode) override;
/**
* Implemented by child class. Handle all command messages which are
* not health, mode, action or housekeeping messages.
* @param message
* @return
*/
ReturnValue_t handleCommandMessage(CommandMessage* message) override;
// HK manager abstract functions.
LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
LocalDataPoolManager& poolManager) override;
// Mode abstract functions
ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode,
uint32_t* msToReachTheMode) override;
// Action override. Forward to user.
ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t* data, size_t size) override;
BpxBatteryCfg cfgSet;
BpxBatteryHk hkSet;
PoolEntry<uint16_t> chargeCurrent = PoolEntry<uint16_t>({0});
PoolEntry<uint16_t> dischargeCurrent = PoolEntry<uint16_t>({0});
PoolEntry<uint16_t> heaterCurrent = PoolEntry<uint16_t>({0});
PoolEntry<uint16_t> battVolt = PoolEntry<uint16_t>({16'000});
PoolEntry<int16_t> battTemp1 = PoolEntry<int16_t>({10}, true);
PoolEntry<int16_t> battTemp2 = PoolEntry<int16_t>({10}, true);
PoolEntry<int16_t> battTemp3 = PoolEntry<int16_t>({10}, true);
PoolEntry<int16_t> battTemp4 = PoolEntry<int16_t>({10}, true);
PoolEntry<uint32_t> rebootCounter = PoolEntry<uint32_t>({0});
PoolEntry<uint8_t> bootCause = PoolEntry<uint8_t>({0});
PoolEntry<uint8_t> battheatMode = PoolEntry<uint8_t>({0});
PoolEntry<int8_t> battheatLow = PoolEntry<int8_t>({0});
PoolEntry<int8_t> battheatHigh = PoolEntry<int8_t>({0});
};

View File

@@ -29,4 +29,5 @@ target_sources(
PlocSupervisorDummy.cpp PlocSupervisorDummy.cpp
helperFactory.cpp helperFactory.cpp
MgmRm3100Dummy.cpp MgmRm3100Dummy.cpp
BatteryDummy.cpp
Tmp1075Dummy.cpp) Tmp1075Dummy.cpp)

View File

@@ -2,14 +2,15 @@
#include <mission/com/syrlinksDefs.h> #include <mission/com/syrlinksDefs.h>
SyrlinksDummy::SyrlinksDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie) SyrlinksDummy::SyrlinksDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie,
: DeviceHandlerBase(objectId, comif, comCookie) {} DeviceHandlerFailureIsolation *fdir)
: DeviceHandlerBase(objectId, comif, comCookie, fdir) {}
SyrlinksDummy::~SyrlinksDummy() {} SyrlinksDummy::~SyrlinksDummy() {}
void SyrlinksDummy::doStartUp() {} void SyrlinksDummy::doStartUp() { setMode(MODE_ON); }
void SyrlinksDummy::doShutDown() {} void SyrlinksDummy::doShutDown() { setMode(MODE_OFF); }
ReturnValue_t SyrlinksDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { ReturnValue_t SyrlinksDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND; return NOTHING_TO_SEND;
@@ -36,7 +37,7 @@ ReturnValue_t SyrlinksDummy::interpretDeviceReply(DeviceCommandId_t id, const ui
void SyrlinksDummy::fillCommandAndReplyMap() {} void SyrlinksDummy::fillCommandAndReplyMap() {}
uint32_t SyrlinksDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; } uint32_t SyrlinksDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 1000; }
ReturnValue_t SyrlinksDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap, ReturnValue_t SyrlinksDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) { LocalDataPoolManager &poolManager) {

View File

@@ -11,7 +11,8 @@ class SyrlinksDummy : public DeviceHandlerBase {
static const uint8_t SIMPLE_COMMAND_DATA = 1; static const uint8_t SIMPLE_COMMAND_DATA = 1;
static const uint8_t PERIODIC_REPLY_DATA = 2; static const uint8_t PERIODIC_REPLY_DATA = 2;
SyrlinksDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie); SyrlinksDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie,
DeviceHandlerFailureIsolation *fdir);
virtual ~SyrlinksDummy(); virtual ~SyrlinksDummy();
protected: protected:

View File

@@ -1,6 +1,7 @@
#include "helperFactory.h" #include "helperFactory.h"
#include <dummies/AcuDummy.h> #include <dummies/AcuDummy.h>
#include <dummies/BatteryDummy.h>
#include <dummies/BpxDummy.h> #include <dummies/BpxDummy.h>
#include <dummies/ComCookieDummy.h> #include <dummies/ComCookieDummy.h>
#include <dummies/ComIFDummy.h> #include <dummies/ComIFDummy.h>
@@ -30,6 +31,8 @@
#include <mission/power/gsDefs.h> #include <mission/power/gsDefs.h>
#include <mission/system/acs/ImtqAssembly.h> #include <mission/system/acs/ImtqAssembly.h>
#include <mission/system/acs/StrAssembly.h> #include <mission/system/acs/StrAssembly.h>
#include <mission/system/com/SyrlinksAssembly.h>
#include <mission/system/com/SyrlinksFdir.h>
#include <mission/system/objects/CamSwitcher.h> #include <mission/system/objects/CamSwitcher.h>
#include <mission/system/tcs/TcsBoardAssembly.h> #include <mission/system/tcs/TcsBoardAssembly.h>
@@ -49,7 +52,7 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio
new ComIFDummy(objects::DUMMY_COM_IF); new ComIFDummy(objects::DUMMY_COM_IF);
auto* comCookieDummy = new ComCookieDummy(); auto* comCookieDummy = new ComCookieDummy();
if (cfg.addBpxBattDummy) { if (cfg.addBpxBattDummy) {
new BpxDummy(objects::BPX_BATT_HANDLER, objects::DUMMY_COM_IF, comCookieDummy); new BatteryDummy(DhbConfig(objects::BPX_BATT_HANDLER));
} }
if (cfg.addCoreCtrlCfg) { if (cfg.addCoreCtrlCfg) {
new CoreControllerDummy(objects::CORE_CONTROLLER); new CoreControllerDummy(objects::CORE_CONTROLLER);
@@ -74,9 +77,13 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio
strDummy->connectModeTreeParent(*strAssy); strDummy->connectModeTreeParent(*strAssy);
} }
if (cfg.addSyrlinksDummies) { if (cfg.addSyrlinksDummies) {
auto* syrlinksDummy = auto* syrlinksAssy = new SyrlinksAssembly(objects::SYRLINKS_ASSY);
new SyrlinksDummy(objects::SYRLINKS_HANDLER, objects::DUMMY_COM_IF, comCookieDummy); syrlinksAssy->connectModeTreeParent(satsystem::com::SUBSYSTEM);
syrlinksDummy->connectModeTreeParent(satsystem::com::SUBSYSTEM);
auto syrlinksFdir = new SyrlinksFdir(objects::SYRLINKS_HANDLER);
auto* syrlinksDummy = new SyrlinksDummy(objects::SYRLINKS_HANDLER, objects::DUMMY_COM_IF,
comCookieDummy, syrlinksFdir);
syrlinksDummy->connectModeTreeParent(*syrlinksAssy);
} }
auto* imtqAssy = new ImtqAssembly(objects::IMTQ_ASSY); auto* imtqAssy = new ImtqAssembly(objects::IMTQ_ASSY);
imtqAssy->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM); imtqAssy->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM);

View File

@@ -135,7 +135,8 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
11605;0x2d55;MPSOC_HANDLER_SEQUENCE_COUNT_MISMATCH;LOW;Packet sequence count in received space packet does not match expected count P1: Expected sequence count P2: Received sequence count;linux/payload/plocMpsocHelpers.h 11605;0x2d55;MPSOC_HANDLER_SEQUENCE_COUNT_MISMATCH;LOW;Packet sequence count in received space packet does not match expected count P1: Expected sequence count P2: Received sequence count;linux/payload/plocMpsocHelpers.h
11606;0x2d56;MPSOC_SHUTDOWN_FAILED;HIGH;Supervisor fails to shutdown MPSoC. Requires to power off the PLOC and thus also to shutdown the supervisor.;linux/payload/plocMpsocHelpers.h 11606;0x2d56;MPSOC_SHUTDOWN_FAILED;HIGH;Supervisor fails to shutdown MPSoC. Requires to power off the PLOC and thus also to shutdown the supervisor.;linux/payload/plocMpsocHelpers.h
11607;0x2d57;SUPV_NOT_ON;LOW;SUPV not on for boot or shutdown process. P1: 0 for OFF transition, 1 for ON transition.;linux/payload/plocMpsocHelpers.h 11607;0x2d57;SUPV_NOT_ON;LOW;SUPV not on for boot or shutdown process. P1: 0 for OFF transition, 1 for ON transition.;linux/payload/plocMpsocHelpers.h
11608;0x2d58;SUPV_REPLY_TIMEOUT;LOW;No description;linux/payload/plocMpsocHelpers.h 11608;0x2d58;SUPV_REPLY_TIMEOUT;LOW;SUPV reply timeout.;linux/payload/plocMpsocHelpers.h
11609;0x2d59;CAM_MUST_BE_ON_FOR_SNAPSHOT_MODE;LOW;Camera must be commanded on first.;linux/payload/plocMpsocHelpers.h
11701;0x2db5;SELF_TEST_I2C_FAILURE;LOW;Get self test result returns I2C failure P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/acs/ImtqHandler.h 11701;0x2db5;SELF_TEST_I2C_FAILURE;LOW;Get self test result returns I2C failure P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/acs/ImtqHandler.h
11702;0x2db6;SELF_TEST_SPI_FAILURE;LOW;Get self test result returns SPI failure. This concerns the MTM connectivity. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/acs/ImtqHandler.h 11702;0x2db6;SELF_TEST_SPI_FAILURE;LOW;Get self test result returns SPI failure. This concerns the MTM connectivity. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/acs/ImtqHandler.h
11703;0x2db7;SELF_TEST_ADC_FAILURE;LOW;Get self test result returns failure in measurement of current and temperature. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/acs/ImtqHandler.h 11703;0x2db7;SELF_TEST_ADC_FAILURE;LOW;Get self test result returns failure in measurement of current and temperature. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/acs/ImtqHandler.h
1 Event ID (dec) Event ID (hex) Name Severity Description File Path
135 11605 0x2d55 MPSOC_HANDLER_SEQUENCE_COUNT_MISMATCH LOW Packet sequence count in received space packet does not match expected count P1: Expected sequence count P2: Received sequence count linux/payload/plocMpsocHelpers.h
136 11606 0x2d56 MPSOC_SHUTDOWN_FAILED HIGH Supervisor fails to shutdown MPSoC. Requires to power off the PLOC and thus also to shutdown the supervisor. linux/payload/plocMpsocHelpers.h
137 11607 0x2d57 SUPV_NOT_ON LOW SUPV not on for boot or shutdown process. P1: 0 for OFF transition, 1 for ON transition. linux/payload/plocMpsocHelpers.h
138 11608 0x2d58 SUPV_REPLY_TIMEOUT LOW No description SUPV reply timeout. linux/payload/plocMpsocHelpers.h
139 11609 0x2d59 CAM_MUST_BE_ON_FOR_SNAPSHOT_MODE LOW Camera must be commanded on first. linux/payload/plocMpsocHelpers.h
140 11701 0x2db5 SELF_TEST_I2C_FAILURE LOW Get self test result returns I2C failure P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA mission/acs/ImtqHandler.h
141 11702 0x2db6 SELF_TEST_SPI_FAILURE LOW Get self test result returns SPI failure. This concerns the MTM connectivity. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA mission/acs/ImtqHandler.h
142 11703 0x2db7 SELF_TEST_ADC_FAILURE LOW Get self test result returns failure in measurement of current and temperature. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA mission/acs/ImtqHandler.h

View File

@@ -135,7 +135,8 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
11605;0x2d55;MPSOC_HANDLER_SEQUENCE_COUNT_MISMATCH;LOW;Packet sequence count in received space packet does not match expected count P1: Expected sequence count P2: Received sequence count;linux/payload/plocMpsocHelpers.h 11605;0x2d55;MPSOC_HANDLER_SEQUENCE_COUNT_MISMATCH;LOW;Packet sequence count in received space packet does not match expected count P1: Expected sequence count P2: Received sequence count;linux/payload/plocMpsocHelpers.h
11606;0x2d56;MPSOC_SHUTDOWN_FAILED;HIGH;Supervisor fails to shutdown MPSoC. Requires to power off the PLOC and thus also to shutdown the supervisor.;linux/payload/plocMpsocHelpers.h 11606;0x2d56;MPSOC_SHUTDOWN_FAILED;HIGH;Supervisor fails to shutdown MPSoC. Requires to power off the PLOC and thus also to shutdown the supervisor.;linux/payload/plocMpsocHelpers.h
11607;0x2d57;SUPV_NOT_ON;LOW;SUPV not on for boot or shutdown process. P1: 0 for OFF transition, 1 for ON transition.;linux/payload/plocMpsocHelpers.h 11607;0x2d57;SUPV_NOT_ON;LOW;SUPV not on for boot or shutdown process. P1: 0 for OFF transition, 1 for ON transition.;linux/payload/plocMpsocHelpers.h
11608;0x2d58;SUPV_REPLY_TIMEOUT;LOW;No description;linux/payload/plocMpsocHelpers.h 11608;0x2d58;SUPV_REPLY_TIMEOUT;LOW;SUPV reply timeout.;linux/payload/plocMpsocHelpers.h
11609;0x2d59;CAM_MUST_BE_ON_FOR_SNAPSHOT_MODE;LOW;Camera must be commanded on first.;linux/payload/plocMpsocHelpers.h
11701;0x2db5;SELF_TEST_I2C_FAILURE;LOW;Get self test result returns I2C failure P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/acs/ImtqHandler.h 11701;0x2db5;SELF_TEST_I2C_FAILURE;LOW;Get self test result returns I2C failure P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/acs/ImtqHandler.h
11702;0x2db6;SELF_TEST_SPI_FAILURE;LOW;Get self test result returns SPI failure. This concerns the MTM connectivity. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/acs/ImtqHandler.h 11702;0x2db6;SELF_TEST_SPI_FAILURE;LOW;Get self test result returns SPI failure. This concerns the MTM connectivity. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/acs/ImtqHandler.h
11703;0x2db7;SELF_TEST_ADC_FAILURE;LOW;Get self test result returns failure in measurement of current and temperature. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/acs/ImtqHandler.h 11703;0x2db7;SELF_TEST_ADC_FAILURE;LOW;Get self test result returns failure in measurement of current and temperature. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/acs/ImtqHandler.h
1 Event ID (dec) Event ID (hex) Name Severity Description File Path
135 11605 0x2d55 MPSOC_HANDLER_SEQUENCE_COUNT_MISMATCH LOW Packet sequence count in received space packet does not match expected count P1: Expected sequence count P2: Received sequence count linux/payload/plocMpsocHelpers.h
136 11606 0x2d56 MPSOC_SHUTDOWN_FAILED HIGH Supervisor fails to shutdown MPSoC. Requires to power off the PLOC and thus also to shutdown the supervisor. linux/payload/plocMpsocHelpers.h
137 11607 0x2d57 SUPV_NOT_ON LOW SUPV not on for boot or shutdown process. P1: 0 for OFF transition, 1 for ON transition. linux/payload/plocMpsocHelpers.h
138 11608 0x2d58 SUPV_REPLY_TIMEOUT LOW No description SUPV reply timeout. linux/payload/plocMpsocHelpers.h
139 11609 0x2d59 CAM_MUST_BE_ON_FOR_SNAPSHOT_MODE LOW Camera must be commanded on first. linux/payload/plocMpsocHelpers.h
140 11701 0x2db5 SELF_TEST_I2C_FAILURE LOW Get self test result returns I2C failure P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA mission/acs/ImtqHandler.h
141 11702 0x2db6 SELF_TEST_SPI_FAILURE LOW Get self test result returns SPI failure. This concerns the MTM connectivity. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA mission/acs/ImtqHandler.h
142 11703 0x2db7 SELF_TEST_ADC_FAILURE LOW Get self test result returns failure in measurement of current and temperature. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA mission/acs/ImtqHandler.h

View File

@@ -1,7 +1,7 @@
/** /**
* @brief Auto-generated event translation file. Contains 324 translations. * @brief Auto-generated event translation file. Contains 325 translations.
* @details * @details
* Generated on: 2024-04-17 11:22:10 * Generated on: 2024-05-06 13:47:38
*/ */
#include "translateEvents.h" #include "translateEvents.h"
@@ -142,6 +142,7 @@ const char *MPSOC_HANDLER_SEQUENCE_COUNT_MISMATCH_STRING = "MPSOC_HANDLER_SEQUEN
const char *MPSOC_SHUTDOWN_FAILED_STRING = "MPSOC_SHUTDOWN_FAILED"; const char *MPSOC_SHUTDOWN_FAILED_STRING = "MPSOC_SHUTDOWN_FAILED";
const char *SUPV_NOT_ON_STRING = "SUPV_NOT_ON"; const char *SUPV_NOT_ON_STRING = "SUPV_NOT_ON";
const char *SUPV_REPLY_TIMEOUT_STRING = "SUPV_REPLY_TIMEOUT"; const char *SUPV_REPLY_TIMEOUT_STRING = "SUPV_REPLY_TIMEOUT";
const char *CAM_MUST_BE_ON_FOR_SNAPSHOT_MODE_STRING = "CAM_MUST_BE_ON_FOR_SNAPSHOT_MODE";
const char *SELF_TEST_I2C_FAILURE_STRING = "SELF_TEST_I2C_FAILURE"; const char *SELF_TEST_I2C_FAILURE_STRING = "SELF_TEST_I2C_FAILURE";
const char *SELF_TEST_SPI_FAILURE_STRING = "SELF_TEST_SPI_FAILURE"; const char *SELF_TEST_SPI_FAILURE_STRING = "SELF_TEST_SPI_FAILURE";
const char *SELF_TEST_ADC_FAILURE_STRING = "SELF_TEST_ADC_FAILURE"; const char *SELF_TEST_ADC_FAILURE_STRING = "SELF_TEST_ADC_FAILURE";
@@ -606,6 +607,8 @@ const char *translateEvents(Event event) {
return SUPV_NOT_ON_STRING; return SUPV_NOT_ON_STRING;
case (11608): case (11608):
return SUPV_REPLY_TIMEOUT_STRING; return SUPV_REPLY_TIMEOUT_STRING;
case (11609):
return CAM_MUST_BE_ON_FOR_SNAPSHOT_MODE_STRING;
case (11701): case (11701):
return SELF_TEST_I2C_FAILURE_STRING; return SELF_TEST_I2C_FAILURE_STRING;
case (11702): case (11702):

View File

@@ -2,7 +2,7 @@
* @brief Auto-generated object translation file. * @brief Auto-generated object translation file.
* @details * @details
* Contains 180 translations. * Contains 180 translations.
* Generated on: 2024-04-17 11:22:10 * Generated on: 2024-05-06 13:47:38
*/ */
#include "translateObjects.h" #include "translateObjects.h"

View File

@@ -100,7 +100,7 @@ ReturnValue_t GpsHyperionLinuxController::initializeLocalDataPool(
localDataPoolMap.emplace(GpsHyperion::SATS_IN_USE, new PoolEntry<uint8_t>()); localDataPoolMap.emplace(GpsHyperion::SATS_IN_USE, new PoolEntry<uint8_t>());
localDataPoolMap.emplace(GpsHyperion::SATS_IN_VIEW, new PoolEntry<uint8_t>()); localDataPoolMap.emplace(GpsHyperion::SATS_IN_VIEW, new PoolEntry<uint8_t>());
localDataPoolMap.emplace(GpsHyperion::FIX_MODE, new PoolEntry<uint8_t>()); localDataPoolMap.emplace(GpsHyperion::FIX_MODE, new PoolEntry<uint8_t>());
poolManager.subscribeForRegularPeriodicPacket({gpsSet.getSid(), enableHkSets, 30.0}); poolManager.subscribeForRegularPeriodicPacket({gpsSet.getSid(), enableHkSets, 60.0});
localDataPoolMap.emplace(GpsHyperion::SKYVIEW_UNIX_SECONDS, new PoolEntry<double>()); localDataPoolMap.emplace(GpsHyperion::SKYVIEW_UNIX_SECONDS, new PoolEntry<double>());
localDataPoolMap.emplace(GpsHyperion::PRN_ID, new PoolEntry<int16_t>()); localDataPoolMap.emplace(GpsHyperion::PRN_ID, new PoolEntry<int16_t>());
localDataPoolMap.emplace(GpsHyperion::AZIMUTH, new PoolEntry<int16_t>()); localDataPoolMap.emplace(GpsHyperion::AZIMUTH, new PoolEntry<int16_t>());

View File

@@ -28,7 +28,7 @@ class SyrlinksComHandler : public DeviceCommunicationIF,
MutexIF *lock; MutexIF *lock;
SemaphoreIF *semaphore; SemaphoreIF *semaphore;
int serialPort = 0; int serialPort = 0;
struct termios tty {}; struct termios tty{};
Countdown replyTimeout = Countdown(2000); Countdown replyTimeout = Countdown(2000);
std::array<uint8_t, 2048> recBuf{}; std::array<uint8_t, 2048> recBuf{};
SimpleRingBuffer ringBuf; SimpleRingBuffer ringBuf;

View File

@@ -1,7 +1,7 @@
/** /**
* @brief Auto-generated event translation file. Contains 324 translations. * @brief Auto-generated event translation file. Contains 325 translations.
* @details * @details
* Generated on: 2024-04-17 11:22:10 * Generated on: 2024-05-06 13:47:38
*/ */
#include "translateEvents.h" #include "translateEvents.h"
@@ -142,6 +142,7 @@ const char *MPSOC_HANDLER_SEQUENCE_COUNT_MISMATCH_STRING = "MPSOC_HANDLER_SEQUEN
const char *MPSOC_SHUTDOWN_FAILED_STRING = "MPSOC_SHUTDOWN_FAILED"; const char *MPSOC_SHUTDOWN_FAILED_STRING = "MPSOC_SHUTDOWN_FAILED";
const char *SUPV_NOT_ON_STRING = "SUPV_NOT_ON"; const char *SUPV_NOT_ON_STRING = "SUPV_NOT_ON";
const char *SUPV_REPLY_TIMEOUT_STRING = "SUPV_REPLY_TIMEOUT"; const char *SUPV_REPLY_TIMEOUT_STRING = "SUPV_REPLY_TIMEOUT";
const char *CAM_MUST_BE_ON_FOR_SNAPSHOT_MODE_STRING = "CAM_MUST_BE_ON_FOR_SNAPSHOT_MODE";
const char *SELF_TEST_I2C_FAILURE_STRING = "SELF_TEST_I2C_FAILURE"; const char *SELF_TEST_I2C_FAILURE_STRING = "SELF_TEST_I2C_FAILURE";
const char *SELF_TEST_SPI_FAILURE_STRING = "SELF_TEST_SPI_FAILURE"; const char *SELF_TEST_SPI_FAILURE_STRING = "SELF_TEST_SPI_FAILURE";
const char *SELF_TEST_ADC_FAILURE_STRING = "SELF_TEST_ADC_FAILURE"; const char *SELF_TEST_ADC_FAILURE_STRING = "SELF_TEST_ADC_FAILURE";
@@ -606,6 +607,8 @@ const char *translateEvents(Event event) {
return SUPV_NOT_ON_STRING; return SUPV_NOT_ON_STRING;
case (11608): case (11608):
return SUPV_REPLY_TIMEOUT_STRING; return SUPV_REPLY_TIMEOUT_STRING;
case (11609):
return CAM_MUST_BE_ON_FOR_SNAPSHOT_MODE_STRING;
case (11701): case (11701):
return SELF_TEST_I2C_FAILURE_STRING; return SELF_TEST_I2C_FAILURE_STRING;
case (11702): case (11702):

View File

@@ -2,7 +2,7 @@
* @brief Auto-generated object translation file. * @brief Auto-generated object translation file.
* @details * @details
* Contains 180 translations. * Contains 180 translations.
* Generated on: 2024-04-17 11:22:10 * Generated on: 2024-05-06 13:47:38
*/ */
#include "translateObjects.h" #include "translateObjects.h"

View File

@@ -14,7 +14,7 @@
*/ */
class PtmeIF { class PtmeIF {
public: public:
virtual ~PtmeIF(){}; virtual ~PtmeIF() {};
virtual bool containsVc(uint8_t vcId) const = 0; virtual bool containsVc(uint8_t vcId) const = 0;
virtual VirtualChannelIF* getVirtChannel(uint8_t vcId) = 0; virtual VirtualChannelIF* getVirtChannel(uint8_t vcId) = 0;

View File

@@ -15,7 +15,7 @@
*/ */
class VirtualChannelIF : public DirectTmSinkIF { class VirtualChannelIF : public DirectTmSinkIF {
public: public:
virtual ~VirtualChannelIF(){}; virtual ~VirtualChannelIF() {};
virtual ReturnValue_t initialize() = 0; virtual ReturnValue_t initialize() = 0;
virtual void cancelTransfer() = 0; virtual void cancelTransfer() = 0;

View File

@@ -8,22 +8,29 @@
#include "fsfw/devicehandlers/FreshDeviceHandlerBase.h" #include "fsfw/devicehandlers/FreshDeviceHandlerBase.h"
#include "fsfw/ipc/MessageQueueIF.h" #include "fsfw/ipc/MessageQueueIF.h"
#include "fsfw/ipc/QueueFactory.h" #include "fsfw/ipc/QueueFactory.h"
#include "fsfw/ipc/messageQueueDefinitions.h"
#include "fsfw/power/PowerSwitchIF.h"
#include "fsfw/power/definitions.h"
#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/returnvalues/returnvalue.h"
#include "fsfw/serialize/SerializeAdapter.h" #include "fsfw/serialize/SerializeAdapter.h"
#include "linux/payload/MpsocCommunication.h" #include "linux/payload/MpsocCommunication.h"
#include "linux/payload/plocMpsocHelpers.h" #include "linux/payload/plocMpsocHelpers.h"
#include "linux/payload/plocSupvDefs.h" #include "linux/payload/plocSupvDefs.h"
#include "mission/power/gsDefs.h"
FreshMpsocHandler::FreshMpsocHandler(DhbConfig cfg, MpsocCommunication& comInterface, FreshMpsocHandler::FreshMpsocHandler(DhbConfig cfg, MpsocCommunication& comInterface,
PlocMpsocSpecialComHelper& specialComHelper, PlocMpsocSpecialComHelper& specialComHelper,
Gpio uartIsolatorSwitch, object_id_t supervisorHandler) Gpio uartIsolatorSwitch, object_id_t supervisorHandler,
PowerSwitchIF& powerSwitcher, power::Switch_t camSwitchId)
: FreshDeviceHandlerBase(cfg), : FreshDeviceHandlerBase(cfg),
comInterface(comInterface), comInterface(comInterface),
specialComHelper(specialComHelper), specialComHelper(specialComHelper),
commandActionHelper(this), commandActionHelper(this),
uartIsolatorSwitch(uartIsolatorSwitch), uartIsolatorSwitch(uartIsolatorSwitch),
hkReport(this), hkReport(this),
supervisorHandler(supervisorHandler) { supervisorHandler(supervisorHandler),
powerSwitcher(powerSwitcher),
camSwitchId(camSwitchId) {
commandActionHelperQueue = QueueFactory::instance()->createMessageQueue(10); commandActionHelperQueue = QueueFactory::instance()->createMessageQueue(10);
eventQueue = QueueFactory::instance()->createMessageQueue(10); eventQueue = QueueFactory::instance()->createMessageQueue(10);
spParams.maxSize = sizeof(commandBuffer); spParams.maxSize = sizeof(commandBuffer);
@@ -77,8 +84,13 @@ void FreshMpsocHandler::performDefaultDeviceOperation() {
} }
} }
if (mode == MODE_NORMAL and not activeCmdInfo.pending) { // We checked the action queue beforehand, so action commands should always be performed
// TODO: Take care of regular periodic commanding here. // before normal commands.
if (mode == MODE_NORMAL and not activeCmdInfo.pending and not specialComHelperExecuting) {
ReturnValue_t result = commandTcGetHkReport();
if (result == returnvalue::OK) {
commandInitHandling(mpsoc::TC_GET_HK_REPORT, MessageQueueIF::NO_QUEUE);
}
} }
if (activeCmdInfo.pending and activeCmdInfo.cmdCountdown.hasTimedOut()) { if (activeCmdInfo.pending and activeCmdInfo.cmdCountdown.hasTimedOut()) {
@@ -224,6 +236,11 @@ ReturnValue_t FreshMpsocHandler::checkModeCommand(Mode_t mode, Submode_t submode
return HasModesIF::INVALID_SUBMODE; return HasModesIF::INVALID_SUBMODE;
} }
} }
if (submode == mpsoc::Submode::SNAPSHOT and
powerSwitcher.getSwitchState(camSwitchId) != PowerSwitchIF::SWITCH_ON) {
triggerEvent(mpsoc::CAM_MUST_BE_ON_FOR_SNAPSHOT_MODE);
return HasModesIF::TRANS_NOT_ALLOWED;
}
*msToReachTheMode = MPSOC_MODE_CMD_TIMEOUT_MS; *msToReachTheMode = MPSOC_MODE_CMD_TIMEOUT_MS;
return returnvalue::OK; return returnvalue::OK;
} }
@@ -296,8 +313,6 @@ ReturnValue_t FreshMpsocHandler::executeAction(ActionId_t actionId, MessageQueue
default: default:
break; break;
} }
// For longer commands, do not set these.
// TODO: Do all the stuff the form buildDeviceFromDevice blah did.
executeRegularCmd(actionId, commandedBy, data, size); executeRegularCmd(actionId, commandedBy, data, size);
return returnvalue::OK; return returnvalue::OK;
} }
@@ -322,6 +337,10 @@ void FreshMpsocHandler::startTransition(Mode_t newMode, Submode_t submode) {
} else if ((newMode == MODE_ON or newMode == MODE_NORMAL) && } else if ((newMode == MODE_ON or newMode == MODE_NORMAL) &&
((mode == MODE_OFF) or (mode == MODE_UNDEFINED))) { ((mode == MODE_OFF) or (mode == MODE_UNDEFINED))) {
transitionState = TransitionState::TO_ON; transitionState = TransitionState::TO_ON;
} else if (mode == MODE_ON && newMode == MODE_NORMAL) {
hkReport.setReportingEnabled(true);
} else if (mode == MODE_NORMAL && newMode == MODE_ON) {
hkReport.setReportingEnabled(false);
} else if (newMode == MODE_OFF) { } else if (newMode == MODE_OFF) {
transitionState = TransitionState::TO_OFF; transitionState = TransitionState::TO_OFF;
} }
@@ -357,7 +376,9 @@ void FreshMpsocHandler::handleTransitionToOn() {
if (startupState == StartupState::DONE) { if (startupState == StartupState::DONE) {
setMode(targetMode, targetSubmode); setMode(targetMode, targetSubmode);
transitionState = TransitionState::NONE; transitionState = TransitionState::NONE;
hkReport.setReportingEnabled(true); if (targetMode == MODE_NORMAL) {
hkReport.setReportingEnabled(true);
}
powerState = PowerState::IDLE; powerState = PowerState::IDLE;
startupState = StartupState::IDLE; startupState = StartupState::IDLE;
} }
@@ -435,7 +456,7 @@ void FreshMpsocHandler::handleActionCommandFailure(ActionId_t actionId, ReturnVa
if (actionId != supv::START_MPSOC) { if (actionId != supv::START_MPSOC) {
return; return;
} }
sif::info << "PlocMPSoCHandler::handleActionCommandFailure: MPSoC boot command failed" sif::info << "FreshMpsocHandler::handleActionCommandFailure: MPSoC boot command failed"
<< std::endl; << std::endl;
// This is commonly the case when the MPSoC is already operational. Thus the power state is // This is commonly the case when the MPSoC is already operational. Thus the power state is
// set to on here // set to on here
@@ -569,8 +590,8 @@ ReturnValue_t FreshMpsocHandler::executeRegularCmd(ActionId_t actionId,
result = commandTcSimplexStreamFile(commandData, commandDataLen); result = commandTcSimplexStreamFile(commandData, commandDataLen);
break; break;
} }
case (mpsoc::TC_SIMPLEX_STORE_FILE): { case (mpsoc::TC_SPLIT_FILE): {
result = commandTcSimplexStoreFile(commandData, commandDataLen); result = commandTcSplitFile(commandData, commandDataLen);
break; break;
} }
case (mpsoc::TC_DOWNLINK_DATA_MODULATE): { case (mpsoc::TC_DOWNLINK_DATA_MODULATE): {
@@ -585,16 +606,20 @@ ReturnValue_t FreshMpsocHandler::executeRegularCmd(ActionId_t actionId,
} }
if (result == returnvalue::OK) { if (result == returnvalue::OK) {
activeCmdInfo.start(actionId, commandedBy); commandInitHandling(actionId, commandedBy);
/**
* Flushing the receive buffer to make sure there are no data left from a faulty reply.
*/
comInterface.getComHelper().flushUartRxBuffer();
} }
return result; return result;
} }
void FreshMpsocHandler::commandInitHandling(ActionId_t actionId, MessageQueueId_t commandedBy) {
activeCmdInfo.start(actionId, commandedBy);
/**
* Flushing the receive buffer to make sure there are no data left from a faulty reply.
*/
comInterface.getComHelper().flushUartRxBuffer();
}
ReturnValue_t FreshMpsocHandler::commandTcMemWrite(const uint8_t* commandData, ReturnValue_t FreshMpsocHandler::commandTcMemWrite(const uint8_t* commandData,
size_t commandDataLen) { size_t commandDataLen) {
ReturnValue_t result = returnvalue::OK; ReturnValue_t result = returnvalue::OK;
@@ -743,14 +768,14 @@ ReturnValue_t FreshMpsocHandler::commandTcSimplexStreamFile(const uint8_t* comma
return returnvalue::OK; return returnvalue::OK;
} }
ReturnValue_t FreshMpsocHandler::commandTcSimplexStoreFile(const uint8_t* commandData, ReturnValue_t FreshMpsocHandler::commandTcSplitFile(const uint8_t* commandData,
size_t commandDataLen) { size_t commandDataLen) {
mpsoc::TcSimplexStoreFile tcSimplexStoreFile(spParams, commandSequenceCount); mpsoc::TcSplitFile tcSplitFile(spParams, commandSequenceCount);
ReturnValue_t result = tcSimplexStoreFile.setPayload(commandData, commandDataLen); ReturnValue_t result = tcSplitFile.setPayload(commandData, commandDataLen);
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
return result; return result;
} }
finishAndSendTc(mpsoc::TC_SIMPLEX_STORE_FILE, tcSimplexStoreFile); finishAndSendTc(mpsoc::TC_SPLIT_FILE, tcSplitFile);
return returnvalue::OK; return returnvalue::OK;
} }
@@ -784,11 +809,15 @@ ReturnValue_t FreshMpsocHandler::commandTcModeSnapshot() {
ReturnValue_t FreshMpsocHandler::finishAndSendTc(DeviceCommandId_t cmdId, mpsoc::TcBase& tcBase, ReturnValue_t FreshMpsocHandler::finishAndSendTc(DeviceCommandId_t cmdId, mpsoc::TcBase& tcBase,
uint32_t cmdCountdownMs) { uint32_t cmdCountdownMs) {
// Emit warning but still send command.
if (specialComHelperExecuting) {
sif::warning << "PLOC MPSoC: Sending command even though special COM helper is executing"
<< std::endl;
}
ReturnValue_t result = tcBase.finishPacket(); ReturnValue_t result = tcBase.finishPacket();
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
return result; return result;
} }
// TODO: We should find a way so this works with the old implementation.
commandSequenceCount++; commandSequenceCount++;
mpsoc::printTxPacket(tcBase); mpsoc::printTxPacket(tcBase);
@@ -836,8 +865,6 @@ void FreshMpsocHandler::cmdDoneHandler(bool success, ReturnValue_t result) {
ReturnValue_t FreshMpsocHandler::handleDeviceReply() { ReturnValue_t FreshMpsocHandler::handleDeviceReply() {
ReturnValue_t result = returnvalue::OK; ReturnValue_t result = returnvalue::OK;
// SpacePacketReader spacePacket;
// spacePacket.setReadOnlyData(start, remainingSize);
const auto& replyReader = comInterface.getSpReader(); const auto& replyReader = comInterface.getSpReader();
if (replyReader.isNull()) { if (replyReader.isNull()) {
return returnvalue::FAILED; return returnvalue::FAILED;
@@ -889,15 +916,14 @@ ReturnValue_t FreshMpsocHandler::handleDeviceReply() {
default: { default: {
sif::debug << "FreshMpsocHandler:: Reply has invalid APID 0x" << std::hex << std::setfill('0') sif::debug << "FreshMpsocHandler:: Reply has invalid APID 0x" << std::hex << std::setfill('0')
<< std::setw(2) << apid << std::dec << std::endl; << std::setw(2) << apid << std::dec << std::endl;
//*foundLen = remainingSize;
return mpsoc::INVALID_APID; return mpsoc::INVALID_APID;
} }
} }
// TODO: We should implement some way so this can also be used with the former implementation.
uint16_t sequenceCount = replyReader.getSequenceCount(); uint16_t sequenceCount = replyReader.getSequenceCount();
if (sequenceCount != lastReplySequenceCount + 1) { if (sequenceCount != lastReplySequenceCount + 1) {
// TODO: Trigger event for possible missing reply packet to inform operator. // We could trigger event for possible missing reply packet to inform operator, but I don't
// think this is properly implemented and used on the MPSoC side anymore.
} }
lastReplySequenceCount = sequenceCount; lastReplySequenceCount = sequenceCount;
@@ -952,7 +978,6 @@ ReturnValue_t FreshMpsocHandler::handleAckReport() {
switch (replyReader.getApid()) { switch (replyReader.getApid()) {
case mpsoc::apid::ACK_FAILURE: { case mpsoc::apid::ACK_FAILURE: {
// DeviceCommandId_t commandId = getPendingCommand();
uint16_t status = mpsoc::getStatusFromRawData(replyReader.getFullData()); uint16_t status = mpsoc::getStatusFromRawData(replyReader.getFullData());
sif::warning << "MPSoC ACK Failure: " << mpsoc::getStatusString(status) << std::endl; sif::warning << "MPSoC ACK Failure: " << mpsoc::getStatusString(status) << std::endl;
triggerEvent(mpsoc::ACK_FAILURE, activeCmdInfo.pendingCmd, status); triggerEvent(mpsoc::ACK_FAILURE, activeCmdInfo.pendingCmd, status);
@@ -1199,6 +1224,7 @@ bool FreshMpsocHandler::handleHwStartup() {
if (powerState == PowerState::SUPV_FAILED) { if (powerState == PowerState::SUPV_FAILED) {
setMode(MODE_OFF); setMode(MODE_OFF);
powerState = PowerState::IDLE; powerState = PowerState::IDLE;
transitionState = TransitionState::NONE;
return false; return false;
} }
if (powerState == PowerState::PENDING_STARTUP) { if (powerState == PowerState::PENDING_STARTUP) {
@@ -1236,7 +1262,9 @@ bool FreshMpsocHandler::handleHwShutdown() {
supvTransitionCd.resetTimer(); supvTransitionCd.resetTimer();
powerState = PowerState::PENDING_SHUTDOWN; powerState = PowerState::PENDING_SHUTDOWN;
} else { } else {
triggerEvent(mpsoc::SUPV_NOT_ON, 0); if ((this->mode != MODE_OFF) and (this->mode != MODE_UNDEFINED)) {
triggerEvent(mpsoc::SUPV_NOT_ON, 0);
}
powerState = PowerState::DONE; powerState = PowerState::DONE;
} }
} }

View File

@@ -1,3 +1,4 @@
#include "fsfw/action/ActionMessage.h"
#include "fsfw/action/CommandsActionsIF.h" #include "fsfw/action/CommandsActionsIF.h"
#include "fsfw/devicehandlers/DeviceHandlerIF.h" #include "fsfw/devicehandlers/DeviceHandlerIF.h"
#include "fsfw/devicehandlers/FreshDeviceHandlerBase.h" #include "fsfw/devicehandlers/FreshDeviceHandlerBase.h"
@@ -5,6 +6,8 @@
#include "fsfw/ipc/messageQueueDefinitions.h" #include "fsfw/ipc/messageQueueDefinitions.h"
#include "fsfw/modes/ModeMessage.h" #include "fsfw/modes/ModeMessage.h"
#include "fsfw/objectmanager/SystemObjectIF.h" #include "fsfw/objectmanager/SystemObjectIF.h"
#include "fsfw/power/PowerSwitchIF.h"
#include "fsfw/power/definitions.h"
#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/returnvalues/returnvalue.h"
#include "fsfw_hal/linux/gpio/Gpio.h" #include "fsfw_hal/linux/gpio/Gpio.h"
#include "linux/payload/MpsocCommunication.h" #include "linux/payload/MpsocCommunication.h"
@@ -18,7 +21,8 @@ class FreshMpsocHandler : public FreshDeviceHandlerBase, public CommandsActionsI
FreshMpsocHandler(DhbConfig cfg, MpsocCommunication& comInterface, FreshMpsocHandler(DhbConfig cfg, MpsocCommunication& comInterface,
PlocMpsocSpecialComHelper& specialComHelper, Gpio uartIsolatorSwitch, PlocMpsocSpecialComHelper& specialComHelper, Gpio uartIsolatorSwitch,
object_id_t supervisorHandler); object_id_t supervisorHandler, PowerSwitchIF& powerSwitcher,
power::Switch_t camSwitchId);
/** /**
* Periodic helper executed function, implemented by child class. * Periodic helper executed function, implemented by child class.
@@ -128,6 +132,8 @@ class FreshMpsocHandler : public FreshDeviceHandlerBase, public CommandsActionsI
TmMemReadReport tmMemReadReport; TmMemReadReport tmMemReadReport;
uint32_t lastReplySequenceCount = 0; uint32_t lastReplySequenceCount = 0;
uint8_t skipSupvCommandingToOn = false; uint8_t skipSupvCommandingToOn = false;
PowerSwitchIF& powerSwitcher;
power::Switch_t camSwitchId;
// HK manager abstract functions. // HK manager abstract functions.
LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override; LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
@@ -181,7 +187,7 @@ class FreshMpsocHandler : public FreshDeviceHandlerBase, public CommandsActionsI
ReturnValue_t commandTcModeIdle(); ReturnValue_t commandTcModeIdle();
ReturnValue_t commandTcCamTakePic(const uint8_t* commandData, size_t commandDataLen); ReturnValue_t commandTcCamTakePic(const uint8_t* commandData, size_t commandDataLen);
ReturnValue_t commandTcSimplexStreamFile(const uint8_t* commandData, size_t commandDataLen); ReturnValue_t commandTcSimplexStreamFile(const uint8_t* commandData, size_t commandDataLen);
ReturnValue_t commandTcSimplexStoreFile(const uint8_t* commandData, size_t commandDataLen); ReturnValue_t commandTcSplitFile(const uint8_t* commandData, size_t commandDataLen);
ReturnValue_t commandTcDownlinkDataModulate(const uint8_t* commandData, size_t commandDataLen); ReturnValue_t commandTcDownlinkDataModulate(const uint8_t* commandData, size_t commandDataLen);
ReturnValue_t commandTcModeSnapshot(); ReturnValue_t commandTcModeSnapshot();
@@ -202,4 +208,5 @@ class FreshMpsocHandler : public FreshDeviceHandlerBase, public CommandsActionsI
void commandSubmodeTransition(); void commandSubmodeTransition();
void commonSpecialComInit(); void commonSpecialComInit();
void commonSpecialComStop(); void commonSpecialComStop();
void commandInitHandling(ActionId_t actionId, MessageQueueId_t commandedBy);
}; };

View File

@@ -241,6 +241,10 @@ ReturnValue_t FreshSupvHandler::executeAction(ActionId_t actionId, MessageQueueI
uartManager->initiateUpdateContinuation(); uartManager->initiateUpdateContinuation();
return EXECUTION_FINISHED; return EXECUTION_FINISHED;
} }
case ABORT_LONGER_REQUEST: {
uartManager->stop();
return EXECUTION_FINISHED;
}
case MEMORY_CHECK_WITH_FILE: { case MEMORY_CHECK_WITH_FILE: {
UpdateParams params; UpdateParams params;
result = extractBaseParams(&data, size, params); result = extractBaseParams(&data, size, params);
@@ -849,6 +853,10 @@ ReturnValue_t FreshSupvHandler::prepareWipeMramCmd(const uint8_t* commandData, s
ReturnValue_t FreshSupvHandler::parseTmPackets() { ReturnValue_t FreshSupvHandler::parseTmPackets() {
uint8_t* receivedData = nullptr; uint8_t* receivedData = nullptr;
size_t receivedSize = 0; size_t receivedSize = 0;
// We do not want to steal packets from the long request handler.
if (uartManager->longerRequestActive()) {
return returnvalue::OK;
}
while (true) { while (true) {
ReturnValue_t result = ReturnValue_t result =
uartManager->readReceivedMessage(comCookie, &receivedData, &receivedSize); uartManager->readReceivedMessage(comCookie, &receivedData, &receivedSize);

View File

@@ -9,8 +9,8 @@
#include "fsfw/tmtcpacket/ccsds/SpacePacketReader.h" #include "fsfw/tmtcpacket/ccsds/SpacePacketReader.h"
#include "linux/payload/SerialCommunicationHelper.h" #include "linux/payload/SerialCommunicationHelper.h"
static constexpr bool MPSOC_LOW_LEVEL_TX_WIRETAPPING = true; static constexpr bool MPSOC_LOW_LEVEL_TX_WIRETAPPING = false;
static constexpr bool MPSOC_LOW_LEVEL_RX_WIRETAPPING = true; static constexpr bool MPSOC_LOW_LEVEL_RX_WIRETAPPING = false;
class MpsocCommunication : public SystemObject { class MpsocCommunication : public SystemObject {
public: public:

View File

@@ -179,8 +179,12 @@ ReturnValue_t PlocMpsocSpecialComHelper::performFlashWrite() {
ReturnValue_t PlocMpsocSpecialComHelper::performFlashRead() { ReturnValue_t PlocMpsocSpecialComHelper::performFlashRead() {
std::error_code e; std::error_code e;
std::ofstream ofile(flashReadAndWrite.obcFile, std::ios::trunc | std::ios::binary); if (std::filesystem::exists(flashReadAndWrite.obcFile)) {
if (ofile.bad()) { // Truncate the file first.
std::ofstream ofile(flashReadAndWrite.obcFile, std::ios::binary | std::ios::trunc);
}
std::ofstream ofile(flashReadAndWrite.obcFile, std::ios::binary | std::ios::app);
if (ofile.bad() or not ofile.is_open()) {
return returnvalue::FAILED; return returnvalue::FAILED;
} }
ReturnValue_t result = flashfopen(mpsoc::FileAccessModes::READ); ReturnValue_t result = flashfopen(mpsoc::FileAccessModes::READ);

View File

@@ -11,6 +11,8 @@
#include <fstream> #include <fstream>
#include "OBSWConfig.h" #include "OBSWConfig.h"
#include "fsfw/returnvalues/returnvalue.h"
#include "linux/payload/plocSupvDefs.h"
#include "tas/hdlc.h" #include "tas/hdlc.h"
#ifdef XIPHOS_Q7S #ifdef XIPHOS_Q7S
#include "bsp_q7s/fs/FilesystemHelper.h" #include "bsp_q7s/fs/FilesystemHelper.h"
@@ -21,9 +23,13 @@
#include "fsfw/tasks/TaskFactory.h" #include "fsfw/tasks/TaskFactory.h"
#include "fsfw/timemanager/Countdown.h" #include "fsfw/timemanager/Countdown.h"
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1
#include "mission/utility/Filenaming.h" #include "mission/utility/Filenaming.h"
#include "mission/utility/ProgressPrinter.h" #include "mission/utility/ProgressPrinter.h"
#include "mission/utility/Timestamp.h" #include "mission/utility/Timestamp.h"
#endif
#include "tas/crc.h" #include "tas/crc.h"
using namespace returnvalue; using namespace returnvalue;
@@ -277,23 +283,6 @@ ReturnValue_t PlocSupvUartManager::initiateUpdateContinuation() {
return returnvalue::OK; return returnvalue::OK;
} }
// ReturnValue_t PlocSupvHelper::startEventBufferRequest(std::string path) {
// #ifdef XIPHOS_Q7S
// ReturnValue_t result = FilesystemHelper::checkPath(path);
// if (result != returnvalue::OK) {
// return result;
// }
// #endif
// if (not std::filesystem::exists(path)) {
// return PATH_NOT_EXISTS;
// }
// eventBufferReq.path = path;
// request = Request::REQUEST_EVENT_BUFFER;
// //uartComIF->flushUartTxAndRxBuf(comCookie);
// semaphore->release();
// return returnvalue::OK;
// }
void PlocSupvUartManager::stop() { void PlocSupvUartManager::stop() {
MutexGuard mg(lock); MutexGuard mg(lock);
if (state == InternalState::SLEEPING or state == InternalState::GO_TO_SLEEP) { if (state == InternalState::SLEEPING or state == InternalState::GO_TO_SLEEP) {
@@ -449,10 +438,8 @@ ReturnValue_t PlocSupvUartManager::writeUpdatePackets() {
update.bytesWritten); update.bytesWritten);
return result; return result;
} }
result = handlePacketTransmissionNoReply(packet, 5000); result = writeMemoryHandlingWithRetryLogic(packet, progPercent);
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
triggerEvent(WRITE_MEMORY_FAILED, buildProgParams1(progPercent, update.sequenceCount),
update.bytesWritten);
return result; return result;
} }
@@ -463,7 +450,25 @@ ReturnValue_t PlocSupvUartManager::writeUpdatePackets() {
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1 #if OBSW_DEBUG_PLOC_SUPERVISOR == 1
progressPrinter.print(update.bytesWritten); progressPrinter.print(update.bytesWritten);
#endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */ #endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */
// TaskFactory::delayTask(1); }
return result;
}
ReturnValue_t PlocSupvUartManager::writeMemoryHandlingWithRetryLogic(supv::WriteMemory& packet,
unsigned progPercent) {
ReturnValue_t result = returnvalue::OK;
// Simple re-try logic in place to deal with communication unreliability in orbit.
for (uint8_t retryCount = 0; retryCount < MAX_RETRY_COUNT; retryCount++) {
result = handlePacketTransmissionNoReply(packet, COM_TIMEOUT_MS);
if (result == returnvalue::OK) {
return result;
}
triggerEvent(WRITE_MEMORY_FAILED, buildProgParams1(progPercent, update.sequenceCount),
update.bytesWritten);
// Clear data structures related to reply handling.
serial::flushTxRxBuf(serialPort);
recRingBuf.clear();
decodedRingBuf.clear();
} }
return result; return result;
} }
@@ -572,7 +577,16 @@ ReturnValue_t PlocSupvUartManager::handlePacketTransmissionNoReply(
bool ackReceived = false; bool ackReceived = false;
bool packetWasHandled = false; bool packetWasHandled = false;
while (true) { while (true) {
handleUartReception(); ReturnValue_t status = handleUartReception();
if (status != returnvalue::OK) {
result = status;
if (result == HDLC_ERROR) {
// We could bail here immediately.. but I prefer to wait for the timeout, because we should
// ensure that all packets which might be related to the transfer are still received and
// cleared from all data structures related to reply handling.
// return result;
}
}
if (not decodedQueue.empty()) { if (not decodedQueue.empty()) {
size_t packetLen = 0; size_t packetLen = 0;
decodedQueue.retrieve(&packetLen); decodedQueue.retrieve(&packetLen);
@@ -615,7 +629,7 @@ ReturnValue_t PlocSupvUartManager::handlePacketTransmissionNoReply(
return result::NO_REPLY_TIMEOUT; return result::NO_REPLY_TIMEOUT;
} }
} }
return returnvalue::OK; return result;
} }
int PlocSupvUartManager::handleAckReception(supv::TcBase& tc, size_t packetLen) { int PlocSupvUartManager::handleAckReception(supv::TcBase& tc, size_t packetLen) {

View File

@@ -118,6 +118,7 @@ class PlocSupvUartManager : public DeviceCommunicationIF,
static constexpr Event HDLC_FRAME_REMOVAL_ERROR = MAKE_EVENT(31, severity::INFO); static constexpr Event HDLC_FRAME_REMOVAL_ERROR = MAKE_EVENT(31, severity::INFO);
static constexpr Event HDLC_CRC_ERROR = MAKE_EVENT(32, severity::INFO); static constexpr Event HDLC_CRC_ERROR = MAKE_EVENT(32, severity::INFO);
static constexpr unsigned MAX_RETRY_COUNT = 3;
PlocSupvUartManager(object_id_t objectId); PlocSupvUartManager(object_id_t objectId);
virtual ~PlocSupvUartManager(); virtual ~PlocSupvUartManager();
/** /**
@@ -199,6 +200,8 @@ class PlocSupvUartManager : public DeviceCommunicationIF,
static constexpr ReturnValue_t POSSIBLE_PACKET_LOSS_CONSECUTIVE_END = returnvalue::makeCode(1, 4); static constexpr ReturnValue_t POSSIBLE_PACKET_LOSS_CONSECUTIVE_END = returnvalue::makeCode(1, 4);
static constexpr ReturnValue_t HDLC_ERROR = returnvalue::makeCode(1, 5); static constexpr ReturnValue_t HDLC_ERROR = returnvalue::makeCode(1, 5);
static constexpr uint32_t COM_TIMEOUT_MS = 3000;
static const uint16_t CRC16_INIT = 0xFFFF; static const uint16_t CRC16_INIT = 0xFFFF;
// Event buffer reply will carry 24 space packets with 1016 bytes and one space packet with // Event buffer reply will carry 24 space packets with 1016 bytes and one space packet with
// 192 bytes // 192 bytes
@@ -369,6 +372,8 @@ class PlocSupvUartManager : public DeviceCommunicationIF,
*/ */
ReturnValue_t requestReceiveMessage(CookieIF* cookie, size_t requestLen) override; ReturnValue_t requestReceiveMessage(CookieIF* cookie, size_t requestLen) override;
ReturnValue_t writeMemoryHandlingWithRetryLogic(supv::WriteMemory& packet, unsigned progPercent);
void performUartShutdown(); void performUartShutdown();
void updateVtime(uint8_t vtime); void updateVtime(uint8_t vtime);
}; };

View File

@@ -2,6 +2,6 @@
ScexDleParser::ScexDleParser(SimpleRingBuffer &decodeRingBuf, DleEncoder &decoder, ScexDleParser::ScexDleParser(SimpleRingBuffer &decodeRingBuf, DleEncoder &decoder,
BufPair encodedBuf, BufPair decodedBuf) BufPair encodedBuf, BufPair decodedBuf)
: DleParser(decodeRingBuf, decoder, encodedBuf, decodedBuf){}; : DleParser(decodeRingBuf, decoder, encodedBuf, decodedBuf) {};
ScexDleParser::~ScexDleParser(){}; ScexDleParser::~ScexDleParser() {};

View File

@@ -8,12 +8,16 @@
#include "eive/eventSubsystemIds.h" #include "eive/eventSubsystemIds.h"
#include "eive/resultClassIds.h" #include "eive/resultClassIds.h"
#include "fsfw/action/HasActionsIF.h" #include "fsfw/action/HasActionsIF.h"
#include "fsfw/events/Event.h"
#include "fsfw/returnvalues/returnvalue.h" #include "fsfw/returnvalues/returnvalue.h"
#include "fsfw/serialize/SerializeAdapter.h" #include "fsfw/serialize/SerializeAdapter.h"
#include "fsfw/serialize/SerializeIF.h" #include "fsfw/serialize/SerializeIF.h"
namespace mpsoc { namespace mpsoc {
static constexpr bool MPSOC_TX_WIRETAPPING = false;
static constexpr bool MPSOC_RX_WIRETAPPING = false;
static constexpr size_t CRC_SIZE = 2; static constexpr size_t CRC_SIZE = 2;
/** /**
@@ -56,9 +60,6 @@ class TcBase : public ploc::SpTcBase {
void printRxPacket(const SpacePacketReader& spReader); void printRxPacket(const SpacePacketReader& spReader);
void printTxPacket(const ploc::SpTcBase& tcBase); void printTxPacket(const ploc::SpTcBase& tcBase);
static constexpr bool MPSOC_TX_WIRETAPPING = true;
static constexpr bool MPSOC_RX_WIRETAPPING = true;
static constexpr uint32_t DEFAULT_CMD_TIMEOUT_MS = 5000; static constexpr uint32_t DEFAULT_CMD_TIMEOUT_MS = 5000;
static constexpr uint32_t CMD_TIMEOUT_MKFS = 15000; static constexpr uint32_t CMD_TIMEOUT_MKFS = 15000;
@@ -112,7 +113,11 @@ static const Event MPSOC_SHUTDOWN_FAILED = MAKE_EVENT(6, severity::HIGH);
//! [EXPORT] : [COMMENT] SUPV not on for boot or shutdown process. P1: 0 for OFF transition, 1 for //! [EXPORT] : [COMMENT] SUPV not on for boot or shutdown process. P1: 0 for OFF transition, 1 for
//! ON transition. //! ON transition.
static constexpr Event SUPV_NOT_ON = event::makeEvent(SUBSYSTEM_ID, 7, severity::LOW); static constexpr Event SUPV_NOT_ON = event::makeEvent(SUBSYSTEM_ID, 7, severity::LOW);
//! [EXPORT] : [COMMENT] SUPV reply timeout.
static constexpr Event SUPV_REPLY_TIMEOUT = event::makeEvent(SUBSYSTEM_ID, 8, severity::LOW); static constexpr Event SUPV_REPLY_TIMEOUT = event::makeEvent(SUBSYSTEM_ID, 8, severity::LOW);
//! [EXPORT] : [COMMENT] Camera must be commanded on first.
static constexpr Event CAM_MUST_BE_ON_FOR_SNAPSHOT_MODE =
event::makeEvent(SUBSYSTEM_ID, 9, severity::LOW);
enum ParamId : uint8_t { SKIP_SUPV_ON_COMMANDING = 0x01 }; enum ParamId : uint8_t { SKIP_SUPV_ON_COMMANDING = 0x01 };
@@ -205,7 +210,7 @@ static const DeviceCommandId_t TC_FLASH_GET_DIRECTORY_CONTENT = 28;
static const DeviceCommandId_t TM_FLASH_DIRECTORY_CONTENT = 29; static const DeviceCommandId_t TM_FLASH_DIRECTORY_CONTENT = 29;
static constexpr DeviceCommandId_t TC_FLASH_READ_FULL_FILE = 30; static constexpr DeviceCommandId_t TC_FLASH_READ_FULL_FILE = 30;
// Store file on MPSoC. // Store file on MPSoC.
static const DeviceCommandId_t TC_SIMPLEX_STORE_FILE = 31; static const DeviceCommandId_t TC_SPLIT_FILE = 31;
static const DeviceCommandId_t TC_VERIFY_BOOT = 32; static const DeviceCommandId_t TC_VERIFY_BOOT = 32;
static const DeviceCommandId_t TC_ENABLE_TC_EXECTION = 33; static const DeviceCommandId_t TC_ENABLE_TC_EXECTION = 33;
static const DeviceCommandId_t TC_FLASH_MKFS = 34; static const DeviceCommandId_t TC_FLASH_MKFS = 34;
@@ -215,8 +220,6 @@ static const DeviceCommandId_t OBSW_RESET_SEQ_COUNT_LEGACY = 50;
static const uint16_t SIZE_ACK_REPORT = 14; static const uint16_t SIZE_ACK_REPORT = 14;
static const uint16_t SIZE_EXE_REPORT = 14; static const uint16_t SIZE_EXE_REPORT = 14;
// static const uint16_t SIZE_TM_MEM_READ_REPORT = 18;
// static const uint16_t SIZE_TM_CAM_CMD_RPT = 18;
static constexpr size_t SIZE_TM_HK_REPORT = 369; static constexpr size_t SIZE_TM_HK_REPORT = 369;
enum Submode : uint8_t { IDLE_OR_NONE = 0, REPLAY = 1, SNAPSHOT = 2 }; enum Submode : uint8_t { IDLE_OR_NONE = 0, REPLAY = 1, SNAPSHOT = 2 };
@@ -855,7 +858,7 @@ class FlashBasePusCmd {
class FlashReadPusCmd : public FlashBasePusCmd { class FlashReadPusCmd : public FlashBasePusCmd {
public: public:
FlashReadPusCmd(){}; FlashReadPusCmd() {};
ReturnValue_t extractFields(const uint8_t* commandData, size_t commandDataLen) override { ReturnValue_t extractFields(const uint8_t* commandData, size_t commandDataLen) override {
ReturnValue_t result = FlashBasePusCmd::extractFields(commandData, commandDataLen); ReturnValue_t result = FlashBasePusCmd::extractFields(commandData, commandDataLen);
@@ -917,13 +920,14 @@ class TcCamTakePic : public TcBase {
} }
size_t deserLen = commandDataLen; size_t deserLen = commandDataLen;
size_t serLen = 0; size_t serLen = 0;
fileName = reinterpret_cast<const char*>(commandData); fileName = std::string(reinterpret_cast<const char*>(commandData));
if (fileName.size() > MAX_FILENAME_SIZE) { if (fileName.size() > MAX_FILENAME_SIZE) {
return FILENAME_TOO_LONG; return FILENAME_TOO_LONG;
} }
deserLen -= fileName.length() + 1; deserLen -= fileName.length() + 1;
*dataPtr += fileName.length() + 1; *dataPtr += fileName.length() + 1;
uint8_t** payloadPtr = &payloadStart; uint8_t** payloadPtr = &payloadStart;
memset(payloadStart, 0, FILENAME_FIELD_SIZE);
memcpy(payloadStart, fileName.data(), fileName.size()); memcpy(payloadStart, fileName.data(), fileName.size());
*payloadPtr += FILENAME_FIELD_SIZE; *payloadPtr += FILENAME_FIELD_SIZE;
serLen += FILENAME_FIELD_SIZE; serLen += FILENAME_FIELD_SIZE;
@@ -1053,9 +1057,9 @@ class TcSimplexStreamFile : public TcBase {
/** /**
* @brief Class to build simplex send file command * @brief Class to build simplex send file command
*/ */
class TcSimplexStoreFile : public TcBase { class TcSplitFile : public TcBase {
public: public:
TcSimplexStoreFile(ploc::SpTcParams params, uint16_t sequenceCount) TcSplitFile(ploc::SpTcParams params, uint16_t sequenceCount)
: TcBase(params, apid::TC_SIMPLEX_SEND_FILE, sequenceCount) {} : TcBase(params, apid::TC_SIMPLEX_SEND_FILE, sequenceCount) {}
ReturnValue_t setPayload(const uint8_t* commandData, size_t commandDataLen) { ReturnValue_t setPayload(const uint8_t* commandData, size_t commandDataLen) {

View File

@@ -159,6 +159,7 @@ static const DeviceCommandId_t ENABLE_NVMS = 59;
static const DeviceCommandId_t CONTINUE_UPDATE = 60; static const DeviceCommandId_t CONTINUE_UPDATE = 60;
static const DeviceCommandId_t MEMORY_CHECK_WITH_FILE = 61; static const DeviceCommandId_t MEMORY_CHECK_WITH_FILE = 61;
static constexpr DeviceCommandId_t MEMORY_CHECK = 62; static constexpr DeviceCommandId_t MEMORY_CHECK = 62;
static constexpr DeviceCommandId_t ABORT_LONGER_REQUEST = 63;
/** Reply IDs */ /** Reply IDs */
enum ReplyId : DeviceCommandId_t { enum ReplyId : DeviceCommandId_t {
@@ -1145,14 +1146,14 @@ class WriteMemory : public TcBase {
: TcBase(params, Apid::MEM_MAN, static_cast<uint8_t>(tc::MemManId::WRITE), 1) {} : TcBase(params, Apid::MEM_MAN, static_cast<uint8_t>(tc::MemManId::WRITE), 1) {}
ReturnValue_t buildPacket(ccsds::SequenceFlags seqFlags, uint16_t sequenceCount, uint8_t memoryId, ReturnValue_t buildPacket(ccsds::SequenceFlags seqFlags, uint16_t sequenceCount, uint8_t memoryId,
uint32_t startAddress, uint16_t length, uint8_t* updateData) { uint32_t currentAddr, uint16_t length, uint8_t* updateData) {
if (length > CHUNK_MAX) { if (length > CHUNK_MAX) {
sif::error << "WriteMemory::WriteMemory: Invalid length" << std::endl; sif::error << "WriteMemory::WriteMemory: Invalid length" << std::endl;
return SerializeIF::BUFFER_TOO_SHORT; return SerializeIF::BUFFER_TOO_SHORT;
} }
spParams.creator.setSeqFlags(seqFlags); spParams.creator.setSeqFlags(seqFlags);
spParams.creator.setSeqCount(sequenceCount); spParams.creator.setSeqCount(sequenceCount);
auto res = initPacket(memoryId, startAddress, length, updateData); auto res = initPacket(memoryId, currentAddr, length, updateData);
if (res != returnvalue::OK) { if (res != returnvalue::OK) {
return res; return res;
} }
@@ -1170,7 +1171,7 @@ class WriteMemory : public TcBase {
static const uint16_t META_DATA_LENGTH = 8; static const uint16_t META_DATA_LENGTH = 8;
uint8_t n = 1; uint8_t n = 1;
ReturnValue_t initPacket(uint8_t memoryId, uint32_t startAddr, uint16_t updateDataLen, ReturnValue_t initPacket(uint8_t memoryId, uint32_t currentAddr, uint16_t updateDataLen,
uint8_t* updateData) { uint8_t* updateData) {
uint8_t* data = payloadStart; uint8_t* data = payloadStart;
if (updateDataLen % 2 != 0) { if (updateDataLen % 2 != 0) {
@@ -1188,7 +1189,7 @@ class WriteMemory : public TcBase {
SerializeIF::Endianness::BIG); SerializeIF::Endianness::BIG);
SerializeAdapter::serialize(&n, &data, &serializedSize, spParams.maxSize, SerializeAdapter::serialize(&n, &data, &serializedSize, spParams.maxSize,
SerializeIF::Endianness::BIG); SerializeIF::Endianness::BIG);
SerializeAdapter::serialize(&startAddr, &data, &serializedSize, spParams.maxSize, SerializeAdapter::serialize(&currentAddr, &data, &serializedSize, spParams.maxSize,
SerializeIF::Endianness::BIG); SerializeIF::Endianness::BIG);
SerializeAdapter::serialize(&updateDataLen, &data, &serializedSize, spParams.maxSize, SerializeAdapter::serialize(&updateDataLen, &data, &serializedSize, spParams.maxSize,
SerializeIF::Endianness::BIG); SerializeIF::Endianness::BIG);

View File

@@ -53,7 +53,7 @@ class CspComIF : public DeviceCommunicationIF, public SystemObject {
typedef uint8_t node_t; typedef uint8_t node_t;
struct ReplyInfo { struct ReplyInfo {
ReplyInfo(size_t maxLen) : replyBuf(maxLen){}; ReplyInfo(size_t maxLen) : replyBuf(maxLen) {};
std::vector<uint8_t> replyBuf; std::vector<uint8_t> replyBuf;
size_t replyLen = 0; size_t replyLen = 0;
}; };

View File

@@ -12,7 +12,7 @@
#include "fsfw/devicehandlers/DeviceCommunicationIF.h" #include "fsfw/devicehandlers/DeviceCommunicationIF.h"
struct Max31865ReaderCookie : public CookieIF { struct Max31865ReaderCookie : public CookieIF {
Max31865ReaderCookie(){}; Max31865ReaderCookie() {};
Max31865ReaderCookie(object_id_t handlerId_, uint8_t idx_, const std::string& locString_, Max31865ReaderCookie(object_id_t handlerId_, uint8_t idx_, const std::string& locString_,
SpiCookie* spiCookie_) SpiCookie* spiCookie_)
: idx(idx_), handlerId(handlerId_), locString(locString_), spiCookie(spiCookie_) {} : idx(idx_), handlerId(handlerId_), locString(locString_), spiCookie(spiCookie_) {}

View File

@@ -795,9 +795,9 @@ ReturnValue_t ImtqHandler::initializeLocalDataPool(localpool::DataPool& localDat
localDataPoolMap.emplace(imtq::FINA_NEG_Z_COIL_Z_TEMPERATURE, new PoolEntry<int16_t>({0})); localDataPoolMap.emplace(imtq::FINA_NEG_Z_COIL_Z_TEMPERATURE, new PoolEntry<int16_t>({0}));
poolManager.subscribeForDiagPeriodicPacket( poolManager.subscribeForDiagPeriodicPacket(
subdp::DiagnosticsHkPeriodicParams(hkDatasetNoTorque.getSid(), enableHkSets, 30.0)); subdp::DiagnosticsHkPeriodicParams(hkDatasetNoTorque.getSid(), enableHkSets, 60.0));
poolManager.subscribeForDiagPeriodicPacket( poolManager.subscribeForDiagPeriodicPacket(
subdp::DiagnosticsHkPeriodicParams(hkDatasetWithTorque.getSid(), enableHkSets, 30.0)); subdp::DiagnosticsHkPeriodicParams(hkDatasetWithTorque.getSid(), enableHkSets, 60.0));
poolManager.subscribeForDiagPeriodicPacket( poolManager.subscribeForDiagPeriodicPacket(
subdp::DiagnosticsHkPeriodicParams(rawMtmNoTorque.getSid(), false, 10.0)); subdp::DiagnosticsHkPeriodicParams(rawMtmNoTorque.getSid(), false, 10.0));
poolManager.subscribeForDiagPeriodicPacket( poolManager.subscribeForDiagPeriodicPacket(

View File

@@ -340,7 +340,7 @@ ReturnValue_t RwHandler::initializeLocalDataPool(localpool::DataPool& localDataP
localDataPoolMap.emplace(rws::SPI_REG_OVERRUN_ERRORS, new PoolEntry<uint32_t>({0})); localDataPoolMap.emplace(rws::SPI_REG_OVERRUN_ERRORS, new PoolEntry<uint32_t>({0}));
localDataPoolMap.emplace(rws::SPI_TOTAL_ERRORS, new PoolEntry<uint32_t>({0})); localDataPoolMap.emplace(rws::SPI_TOTAL_ERRORS, new PoolEntry<uint32_t>({0}));
poolManager.subscribeForDiagPeriodicPacket( poolManager.subscribeForDiagPeriodicPacket(
subdp::DiagnosticsHkPeriodicParams(statusSet.getSid(), false, 12.0)); subdp::DiagnosticsHkPeriodicParams(statusSet.getSid(), false, 30.0));
poolManager.subscribeForRegularPeriodicPacket( poolManager.subscribeForRegularPeriodicPacket(
subdp::RegularHkPeriodicParams(tmDataset.getSid(), false, 30.0)); subdp::RegularHkPeriodicParams(tmDataset.getSid(), false, 30.0));
poolManager.subscribeForRegularPeriodicPacket( poolManager.subscribeForRegularPeriodicPacket(

View File

@@ -1662,7 +1662,7 @@ ReturnValue_t StarTrackerHandler::initializeLocalDataPool(localpool::DataPool& l
poolManager.subscribeForRegularPeriodicPacket( poolManager.subscribeForRegularPeriodicPacket(
subdp::RegularHkPeriodicParams(interfaceSet.getSid(), false, 10.0)); subdp::RegularHkPeriodicParams(interfaceSet.getSid(), false, 10.0));
poolManager.subscribeForDiagPeriodicPacket( poolManager.subscribeForDiagPeriodicPacket(
subdp::DiagnosticsHkPeriodicParams(solutionSet.getSid(), false, 12.0)); subdp::DiagnosticsHkPeriodicParams(solutionSet.getSid(), false, 30.0));
poolManager.subscribeForRegularPeriodicPacket( poolManager.subscribeForRegularPeriodicPacket(
subdp::RegularHkPeriodicParams(cameraSet.getSid(), false, 10.0)); subdp::RegularHkPeriodicParams(cameraSet.getSid(), false, 10.0));
poolManager.subscribeForRegularPeriodicPacket( poolManager.subscribeForRegularPeriodicPacket(
@@ -2099,7 +2099,7 @@ void StarTrackerHandler::preparePowerRequest() {
void StarTrackerHandler::prepareSwitchToBootloaderCmd() { void StarTrackerHandler::prepareSwitchToBootloaderCmd() {
uint32_t length = 0; uint32_t length = 0;
struct RebootActionRequest rebootReq {}; struct RebootActionRequest rebootReq{};
prv_arc_pack_reboot_action_req(&rebootReq, commandBuffer, &length); prv_arc_pack_reboot_action_req(&rebootReq, commandBuffer, &length);
rawPacket = commandBuffer; rawPacket = commandBuffer;
rawPacketLen = length; rawPacketLen = length;

View File

@@ -232,7 +232,8 @@ void AcsController::performSafe() {
acs::ControlModeStrategy safeCtrlStrat = safeCtrl.safeCtrlStrategy( acs::ControlModeStrategy safeCtrlStrat = safeCtrl.safeCtrlStrategy(
mgmDataProcessed.mgmVecTot.isValid(), not mekfInvalidFlag, mgmDataProcessed.mgmVecTot.isValid(), not mekfInvalidFlag,
gyrDataProcessed.gyrVecTot.isValid(), susDataProcessed.susVecTot.isValid(), gyrDataProcessed.gyrVecTot.isValid(), susDataProcessed.susVecTot.isValid(),
fusedRotRateData.rotRateTotal.isValid(), acsParameters.safeModeControllerParameters.useMekf, fusedRotRateSourcesData.rotRateTotalSusMgm.isValid(),
acsParameters.safeModeControllerParameters.useMekf,
acsParameters.safeModeControllerParameters.useGyr, acsParameters.safeModeControllerParameters.useGyr,
acsParameters.safeModeControllerParameters.dampingDuringEclipse); acsParameters.safeModeControllerParameters.dampingDuringEclipse);
switch (safeCtrlStrat) { switch (safeCtrlStrat) {
@@ -251,9 +252,10 @@ void AcsController::performSafe() {
safeCtrlFailureCounter = 0; safeCtrlFailureCounter = 0;
break; break;
case (acs::ControlModeStrategy::SAFECTRL_SUSMGM): case (acs::ControlModeStrategy::SAFECTRL_SUSMGM):
safeCtrl.safeSusMgm(mgmDataProcessed.mgmVecTot.value, fusedRotRateData.rotRateTotal.value, safeCtrl.safeSusMgm(mgmDataProcessed.mgmVecTot.value,
fusedRotRateData.rotRateParallel.value, fusedRotRateSourcesData.rotRateTotalSusMgm.value,
fusedRotRateData.rotRateOrthogonal.value, fusedRotRateSourcesData.rotRateParallelSusMgm.value,
fusedRotRateSourcesData.rotRateOrthogonalSusMgm.value,
susDataProcessed.susVecTot.value, sunTargetDir, magMomMtq, errAng); susDataProcessed.susVecTot.value, sunTargetDir, magMomMtq, errAng);
safeCtrlFailureFlag = false; safeCtrlFailureFlag = false;
safeCtrlFailureCounter = 0; safeCtrlFailureCounter = 0;
@@ -267,8 +269,8 @@ void AcsController::performSafe() {
break; break;
case (acs::ControlModeStrategy::SAFECTRL_ECLIPSE_DAMPING_SUSMGM): case (acs::ControlModeStrategy::SAFECTRL_ECLIPSE_DAMPING_SUSMGM):
safeCtrl.safeRateDampingSusMgm(mgmDataProcessed.mgmVecTot.value, safeCtrl.safeRateDampingSusMgm(mgmDataProcessed.mgmVecTot.value,
fusedRotRateData.rotRateTotal.value, sunTargetDir, magMomMtq, fusedRotRateSourcesData.rotRateTotalSusMgm.value, sunTargetDir,
errAng); magMomMtq, errAng);
safeCtrlFailureFlag = false; safeCtrlFailureFlag = false;
safeCtrlFailureCounter = 0; safeCtrlFailureCounter = 0;
break; break;
@@ -355,7 +357,7 @@ void AcsController::performPointingCtrl() {
} }
acs::ControlModeStrategy ptgCtrlStrat = ptgCtrl.pointingCtrlStrategy( acs::ControlModeStrategy ptgCtrlStrat = ptgCtrl.pointingCtrlStrategy(
mgmDataProcessed.mgmVecTot.isValid(), not mekfInvalidFlag, strValid, mgmDataProcessed.mgmVecTot.isValid(), not mekfInvalidFlag, strValid,
attitudeEstimationData.quatQuest.isValid(), fusedRotRateData.rotRateTotal.isValid(), attitudeEstimationData.quatQuest.isValid(), fusedRotRateData.rotRateTotalSource.isValid(),
fusedRotRateData.rotRateSource.value, useMekf); fusedRotRateData.rotRateSource.value, useMekf);
if (ptgCtrlStrat == acs::ControlModeStrategy::CTRL_NO_MAG_FIELD_FOR_CONTROL or if (ptgCtrlStrat == acs::ControlModeStrategy::CTRL_NO_MAG_FIELD_FOR_CONTROL or
@@ -387,11 +389,11 @@ void AcsController::performPointingCtrl() {
quatBI[1] = sensorValues.strSet.caliQy.value; quatBI[1] = sensorValues.strSet.caliQy.value;
quatBI[2] = sensorValues.strSet.caliQz.value; quatBI[2] = sensorValues.strSet.caliQz.value;
quatBI[3] = sensorValues.strSet.caliQw.value; quatBI[3] = sensorValues.strSet.caliQw.value;
std::memcpy(rotRateB, fusedRotRateData.rotRateTotal.value, sizeof(rotRateB)); std::memcpy(rotRateB, fusedRotRateData.rotRateTotalSource.value, sizeof(rotRateB));
break; break;
case acs::ControlModeStrategy::PTGCTRL_QUEST: case acs::ControlModeStrategy::PTGCTRL_QUEST:
std::memcpy(quatBI, attitudeEstimationData.quatQuest.value, sizeof(quatBI)); std::memcpy(quatBI, attitudeEstimationData.quatQuest.value, sizeof(quatBI));
std::memcpy(rotRateB, fusedRotRateData.rotRateTotal.value, sizeof(rotRateB)); std::memcpy(rotRateB, fusedRotRateData.rotRateTotalSource.value, sizeof(rotRateB));
break; break;
default: default:
sif::error << "AcsController: Invalid pointing mode strategy for performPointingCtrl" sif::error << "AcsController: Invalid pointing mode strategy for performPointingCtrl"
@@ -555,8 +557,8 @@ void AcsController::performPointingCtrl() {
void AcsController::handleDetumbling() { void AcsController::handleDetumbling() {
switch (detumbleState) { switch (detumbleState) {
case DetumbleState::NO_DETUMBLE: case DetumbleState::NO_DETUMBLE:
if (fusedRotRateData.rotRateTotal.isValid() and if (fusedRotRateData.rotRateTotalSusMgm.isValid() and
VectorOperations<double>::norm(fusedRotRateData.rotRateTotal.value, 3) > VectorOperations<double>::norm(fusedRotRateData.rotRateTotalSusMgm.value, 3) >
acsParameters.detumbleParameter.omegaDetumbleStart) { acsParameters.detumbleParameter.omegaDetumbleStart) {
detumbleCounter++; detumbleCounter++;
} else if (detumbleCounter > 0) { } else if (detumbleCounter > 0) {
@@ -599,8 +601,8 @@ void AcsController::handleDetumbling() {
detumbleState = DetumbleState::NO_DETUMBLE; detumbleState = DetumbleState::NO_DETUMBLE;
break; break;
case DetumbleState::IN_DETUMBLE: case DetumbleState::IN_DETUMBLE:
if (fusedRotRateData.rotRateTotal.isValid() and if (fusedRotRateData.rotRateTotalSusMgm.isValid() and
VectorOperations<double>::norm(fusedRotRateData.rotRateTotal.value, 3) < VectorOperations<double>::norm(fusedRotRateData.rotRateTotalSusMgm.value, 3) <
acsParameters.detumbleParameter.omegaDetumbleEnd) { acsParameters.detumbleParameter.omegaDetumbleEnd) {
detumbleCounter++; detumbleCounter++;
} else if (detumbleCounter > 0) { } else if (detumbleCounter > 0) {
@@ -747,7 +749,7 @@ ReturnValue_t AcsController::initializeLocalDataPool(localpool::DataPool &localD
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_3_RM3100_UT, &mgm3VecRaw); localDataPoolMap.emplace(acsctrl::PoolIds::MGM_3_RM3100_UT, &mgm3VecRaw);
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_IMTQ_CAL_NT, &imtqMgmVecRaw); localDataPoolMap.emplace(acsctrl::PoolIds::MGM_IMTQ_CAL_NT, &imtqMgmVecRaw);
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_IMTQ_CAL_ACT_STATUS, &imtqCalActStatus); localDataPoolMap.emplace(acsctrl::PoolIds::MGM_IMTQ_CAL_ACT_STATUS, &imtqCalActStatus);
poolManager.subscribeForRegularPeriodicPacket({mgmDataRaw.getSid(), false, 10.0}); poolManager.subscribeForRegularPeriodicPacket({mgmDataRaw.getSid(), false, 60.0});
// MGM Processed // MGM Processed
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_0_VEC, &mgm0VecProc); localDataPoolMap.emplace(acsctrl::PoolIds::MGM_0_VEC, &mgm0VecProc);
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_1_VEC, &mgm1VecProc); localDataPoolMap.emplace(acsctrl::PoolIds::MGM_1_VEC, &mgm1VecProc);
@@ -757,7 +759,7 @@ ReturnValue_t AcsController::initializeLocalDataPool(localpool::DataPool &localD
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_VEC_TOT, &mgmVecTot); localDataPoolMap.emplace(acsctrl::PoolIds::MGM_VEC_TOT, &mgmVecTot);
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_VEC_TOT_DERIVATIVE, &mgmVecTotDer); localDataPoolMap.emplace(acsctrl::PoolIds::MGM_VEC_TOT_DERIVATIVE, &mgmVecTotDer);
localDataPoolMap.emplace(acsctrl::PoolIds::MAG_IGRF_MODEL, &magIgrf); localDataPoolMap.emplace(acsctrl::PoolIds::MAG_IGRF_MODEL, &magIgrf);
poolManager.subscribeForRegularPeriodicPacket({mgmDataProcessed.getSid(), enableHkSets, 10.0}); poolManager.subscribeForRegularPeriodicPacket({mgmDataProcessed.getSid(), enableHkSets, 60.0});
// SUS Raw // SUS Raw
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_0_N_LOC_XFYFZM_PT_XF, &sus0ValRaw); localDataPoolMap.emplace(acsctrl::PoolIds::SUS_0_N_LOC_XFYFZM_PT_XF, &sus0ValRaw);
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_1_N_LOC_XBYFZM_PT_XB, &sus1ValRaw); localDataPoolMap.emplace(acsctrl::PoolIds::SUS_1_N_LOC_XBYFZM_PT_XB, &sus1ValRaw);
@@ -771,7 +773,7 @@ ReturnValue_t AcsController::initializeLocalDataPool(localpool::DataPool &localD
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_9_R_LOC_XBYBZB_PT_YF, &sus9ValRaw); localDataPoolMap.emplace(acsctrl::PoolIds::SUS_9_R_LOC_XBYBZB_PT_YF, &sus9ValRaw);
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_10_N_LOC_XMYBZF_PT_ZF, &sus10ValRaw); localDataPoolMap.emplace(acsctrl::PoolIds::SUS_10_N_LOC_XMYBZF_PT_ZF, &sus10ValRaw);
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_11_R_LOC_XBYMZB_PT_ZB, &sus11ValRaw); localDataPoolMap.emplace(acsctrl::PoolIds::SUS_11_R_LOC_XBYMZB_PT_ZB, &sus11ValRaw);
poolManager.subscribeForRegularPeriodicPacket({susDataRaw.getSid(), false, 10.0}); poolManager.subscribeForRegularPeriodicPacket({susDataRaw.getSid(), false, 60.0});
// SUS Processed // SUS Processed
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_0_VEC, &sus0VecProc); localDataPoolMap.emplace(acsctrl::PoolIds::SUS_0_VEC, &sus0VecProc);
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_1_VEC, &sus1VecProc); localDataPoolMap.emplace(acsctrl::PoolIds::SUS_1_VEC, &sus1VecProc);
@@ -788,20 +790,20 @@ ReturnValue_t AcsController::initializeLocalDataPool(localpool::DataPool &localD
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_VEC_TOT, &susVecTot); localDataPoolMap.emplace(acsctrl::PoolIds::SUS_VEC_TOT, &susVecTot);
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_VEC_TOT_DERIVATIVE, &susVecTotDer); localDataPoolMap.emplace(acsctrl::PoolIds::SUS_VEC_TOT_DERIVATIVE, &susVecTotDer);
localDataPoolMap.emplace(acsctrl::PoolIds::SUN_IJK_MODEL, &sunIjk); localDataPoolMap.emplace(acsctrl::PoolIds::SUN_IJK_MODEL, &sunIjk);
poolManager.subscribeForRegularPeriodicPacket({susDataProcessed.getSid(), enableHkSets, 10.0}); poolManager.subscribeForRegularPeriodicPacket({susDataProcessed.getSid(), enableHkSets, 60.0});
// GYR Raw // GYR Raw
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_0_ADIS, &gyr0VecRaw); localDataPoolMap.emplace(acsctrl::PoolIds::GYR_0_ADIS, &gyr0VecRaw);
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_1_L3, &gyr1VecRaw); localDataPoolMap.emplace(acsctrl::PoolIds::GYR_1_L3, &gyr1VecRaw);
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_2_ADIS, &gyr2VecRaw); localDataPoolMap.emplace(acsctrl::PoolIds::GYR_2_ADIS, &gyr2VecRaw);
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_3_L3, &gyr3VecRaw); localDataPoolMap.emplace(acsctrl::PoolIds::GYR_3_L3, &gyr3VecRaw);
poolManager.subscribeForDiagPeriodicPacket({gyrDataRaw.getSid(), false, 10.0}); poolManager.subscribeForDiagPeriodicPacket({gyrDataRaw.getSid(), false, 60.0});
// GYR Processed // GYR Processed
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_0_VEC, &gyr0VecProc); localDataPoolMap.emplace(acsctrl::PoolIds::GYR_0_VEC, &gyr0VecProc);
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_1_VEC, &gyr1VecProc); localDataPoolMap.emplace(acsctrl::PoolIds::GYR_1_VEC, &gyr1VecProc);
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_2_VEC, &gyr2VecProc); localDataPoolMap.emplace(acsctrl::PoolIds::GYR_2_VEC, &gyr2VecProc);
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_3_VEC, &gyr3VecProc); localDataPoolMap.emplace(acsctrl::PoolIds::GYR_3_VEC, &gyr3VecProc);
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_VEC_TOT, &gyrVecTot); localDataPoolMap.emplace(acsctrl::PoolIds::GYR_VEC_TOT, &gyrVecTot);
poolManager.subscribeForDiagPeriodicPacket({gyrDataProcessed.getSid(), enableHkSets, 10.0}); poolManager.subscribeForDiagPeriodicPacket({gyrDataProcessed.getSid(), enableHkSets, 60.0});
// GPS Processed // GPS Processed
localDataPoolMap.emplace(acsctrl::PoolIds::GC_LATITUDE, &gcLatitude); localDataPoolMap.emplace(acsctrl::PoolIds::GC_LATITUDE, &gcLatitude);
localDataPoolMap.emplace(acsctrl::PoolIds::GD_LONGITUDE, &gdLongitude); localDataPoolMap.emplace(acsctrl::PoolIds::GD_LONGITUDE, &gdLongitude);
@@ -809,38 +811,37 @@ ReturnValue_t AcsController::initializeLocalDataPool(localpool::DataPool &localD
localDataPoolMap.emplace(acsctrl::PoolIds::GPS_POSITION, &gpsPosition); localDataPoolMap.emplace(acsctrl::PoolIds::GPS_POSITION, &gpsPosition);
localDataPoolMap.emplace(acsctrl::PoolIds::GPS_VELOCITY, &gpsVelocity); localDataPoolMap.emplace(acsctrl::PoolIds::GPS_VELOCITY, &gpsVelocity);
localDataPoolMap.emplace(acsctrl::PoolIds::SOURCE, &gpsSource); localDataPoolMap.emplace(acsctrl::PoolIds::SOURCE, &gpsSource);
poolManager.subscribeForRegularPeriodicPacket({gpsDataProcessed.getSid(), enableHkSets, 30.0}); poolManager.subscribeForRegularPeriodicPacket({gpsDataProcessed.getSid(), enableHkSets, 60.0});
// Attitude Estimation // Attitude Estimation
localDataPoolMap.emplace(acsctrl::PoolIds::QUAT_MEKF, &quatMekf); localDataPoolMap.emplace(acsctrl::PoolIds::QUAT_MEKF, &quatMekf);
localDataPoolMap.emplace(acsctrl::PoolIds::SAT_ROT_RATE_MEKF, &satRotRateMekf); localDataPoolMap.emplace(acsctrl::PoolIds::SAT_ROT_RATE_MEKF, &satRotRateMekf);
localDataPoolMap.emplace(acsctrl::PoolIds::MEKF_STATUS, &mekfStatus); localDataPoolMap.emplace(acsctrl::PoolIds::MEKF_STATUS, &mekfStatus);
localDataPoolMap.emplace(acsctrl::PoolIds::QUAT_QUEST, &quatQuest); localDataPoolMap.emplace(acsctrl::PoolIds::QUAT_QUEST, &quatQuest);
poolManager.subscribeForDiagPeriodicPacket({attitudeEstimationData.getSid(), enableHkSets, 10.0}); poolManager.subscribeForDiagPeriodicPacket({attitudeEstimationData.getSid(), enableHkSets, 30.0});
// Ctrl Values // Ctrl Values
localDataPoolMap.emplace(acsctrl::PoolIds::SAFE_STRAT, &safeStrat); localDataPoolMap.emplace(acsctrl::PoolIds::SAFE_STRAT, &safeStrat);
localDataPoolMap.emplace(acsctrl::PoolIds::TGT_QUAT, &tgtQuat); localDataPoolMap.emplace(acsctrl::PoolIds::TGT_QUAT, &tgtQuat);
localDataPoolMap.emplace(acsctrl::PoolIds::ERROR_QUAT, &errQuat); localDataPoolMap.emplace(acsctrl::PoolIds::ERROR_QUAT, &errQuat);
localDataPoolMap.emplace(acsctrl::PoolIds::ERROR_ANG, &errAng); localDataPoolMap.emplace(acsctrl::PoolIds::ERROR_ANG, &errAng);
localDataPoolMap.emplace(acsctrl::PoolIds::TGT_ROT_RATE, &tgtRotRate); localDataPoolMap.emplace(acsctrl::PoolIds::TGT_ROT_RATE, &tgtRotRate);
poolManager.subscribeForRegularPeriodicPacket({ctrlValData.getSid(), enableHkSets, 10.0}); poolManager.subscribeForRegularPeriodicPacket({ctrlValData.getSid(), enableHkSets, 30.0});
// Actuator CMD // Actuator CMD
localDataPoolMap.emplace(acsctrl::PoolIds::RW_TARGET_TORQUE, &rwTargetTorque); localDataPoolMap.emplace(acsctrl::PoolIds::RW_TARGET_TORQUE, &rwTargetTorque);
localDataPoolMap.emplace(acsctrl::PoolIds::RW_TARGET_SPEED, &rwTargetSpeed); localDataPoolMap.emplace(acsctrl::PoolIds::RW_TARGET_SPEED, &rwTargetSpeed);
localDataPoolMap.emplace(acsctrl::PoolIds::MTQ_TARGET_DIPOLE, &mtqTargetDipole); localDataPoolMap.emplace(acsctrl::PoolIds::MTQ_TARGET_DIPOLE, &mtqTargetDipole);
poolManager.subscribeForRegularPeriodicPacket({actuatorCmdData.getSid(), enableHkSets, 10.0}); poolManager.subscribeForRegularPeriodicPacket({actuatorCmdData.getSid(), enableHkSets, 30.0});
// Fused Rot Rate // Fused Rot Rate
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_ORTHOGONAL, &rotRateOrthogonal); localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_TOT_SUSMGM, &rotRateTotSusMgm);
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_PARALLEL, &rotRateParallel); localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_TOT_SOURCE, &rotRateTotSource);
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_TOTAL, &rotRateTotal);
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_SOURCE, &rotRateSource); localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_SOURCE, &rotRateSource);
poolManager.subscribeForRegularPeriodicPacket({fusedRotRateData.getSid(), enableHkSets, 10.0}); poolManager.subscribeForRegularPeriodicPacket({fusedRotRateData.getSid(), enableHkSets, 30.0});
// Fused Rot Rate Sources // Fused Rot Rate Sources
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_ORTHOGONAL_SUSMGM, &rotRateOrthogonalSusMgm); localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_ORTHOGONAL_SUSMGM, &rotRateOrthogonalSusMgm);
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_PARALLEL_SUSMGM, &rotRateParallelSusMgm); localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_PARALLEL_SUSMGM, &rotRateParallelSusMgm);
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_TOTAL_SUSMGM, &rotRateTotalSusMgm); localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_TOTAL_SUSMGM, &rotRateTotalSusMgm);
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_TOTAL_QUEST, &rotRateTotalQuest); localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_TOTAL_QUEST, &rotRateTotalQuest);
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_TOTAL_STR, &rotRateTotalStr); localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_TOTAL_STR, &rotRateTotalStr);
poolManager.subscribeForRegularPeriodicPacket({fusedRotRateSourcesData.getSid(), false, 10.0}); poolManager.subscribeForRegularPeriodicPacket({fusedRotRateSourcesData.getSid(), false, 60.0});
return returnvalue::OK; return returnvalue::OK;
} }
@@ -926,6 +927,17 @@ void AcsController::modeChanged(Mode_t mode, Submode_t submode) {
if (detumbleState == DetumbleState::IN_DETUMBLE and submode != acs::SafeSubmode::DETUMBLE) { if (detumbleState == DetumbleState::IN_DETUMBLE and submode != acs::SafeSubmode::DETUMBLE) {
detumbleState = DetumbleState::NO_DETUMBLE; detumbleState = DetumbleState::NO_DETUMBLE;
} }
if (mode > acs::AcsMode::PTG_IDLE) {
poolManager.changeCollectionInterval(ctrlValData.getSid(), 10);
poolManager.changeCollectionInterval(actuatorCmdData.getSid(), 10);
poolManager.changeCollectionInterval(fusedRotRateData.getSid(), 10);
poolManager.changeCollectionInterval(attitudeEstimationData.getSid(), 10);
} else {
poolManager.changeCollectionInterval(ctrlValData.getSid(), 30);
poolManager.changeCollectionInterval(actuatorCmdData.getSid(), 30);
poolManager.changeCollectionInterval(fusedRotRateData.getSid(), 30);
poolManager.changeCollectionInterval(attitudeEstimationData.getSid(), 30);
}
return ExtendedControllerBase::modeChanged(mode, submode); return ExtendedControllerBase::modeChanged(mode, submode);
} }

View File

@@ -271,9 +271,8 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes
// Fused Rot Rate // Fused Rot Rate
acsctrl::FusedRotRateData fusedRotRateData; acsctrl::FusedRotRateData fusedRotRateData;
PoolEntry<double> rotRateOrthogonal = PoolEntry<double>(3); PoolEntry<double> rotRateTotSusMgm = PoolEntry<double>(3);
PoolEntry<double> rotRateParallel = PoolEntry<double>(3); PoolEntry<double> rotRateTotSource = PoolEntry<double>(3);
PoolEntry<double> rotRateTotal = PoolEntry<double>(3);
PoolEntry<uint8_t> rotRateSource = PoolEntry<uint8_t>(); PoolEntry<uint8_t> rotRateSource = PoolEntry<uint8_t>();
// Fused Rot Rate Sources // Fused Rot Rate Sources

View File

@@ -38,6 +38,9 @@ ReturnValue_t AcsParameters::getParameter(uint8_t domainId, uint8_t parameterId,
case 0x5: case 0x5:
parameterWrapper->set(onBoardParams.questFilterWeight); parameterWrapper->set(onBoardParams.questFilterWeight);
break; break;
case 0x6:
parameterWrapper->set(onBoardParams.questAngleLimit);
break;
default: default:
return INVALID_IDENTIFIER_ID; return INVALID_IDENTIFIER_ID;
} }

View File

@@ -26,6 +26,7 @@ class AcsParameters : public HasParametersIF {
uint8_t fusedRateFromStr = true; uint8_t fusedRateFromStr = true;
uint8_t fusedRateFromQuest = true; uint8_t fusedRateFromQuest = true;
double questFilterWeight = 0.9; double questFilterWeight = 0.9;
double questAngleLimit = 5 * DEG2RAD;
} onBoardParams; } onBoardParams;
struct InertiaEIVE { struct InertiaEIVE {
@@ -941,7 +942,7 @@ class AcsParameters : public HasParametersIF {
} sunModelParameters; } sunModelParameters;
struct KalmanFilterParameters { struct KalmanFilterParameters {
double sensorNoiseStr = 0.1 * DEG2RAD; double sensorNoiseStr = 0.0028 * DEG2RAD;
double sensorNoiseSus = 8. * DEG2RAD; double sensorNoiseSus = 8. * DEG2RAD;
double sensorNoiseMgm = 4. * DEG2RAD; double sensorNoiseMgm = 4. * DEG2RAD;
double sensorNoiseGyr = 0.1 * DEG2RAD; double sensorNoiseGyr = 0.1 * DEG2RAD;
@@ -949,7 +950,7 @@ class AcsParameters : public HasParametersIF {
double sensorNoiseGyrArw = 3. * 0.0043 / sqrt(10) * DEG2RAD; // Angular Random Walk double sensorNoiseGyrArw = 3. * 0.0043 / sqrt(10) * DEG2RAD; // Angular Random Walk
double sensorNoiseGyrBs = 3. / 3600. * DEG2RAD; // Bias Stability double sensorNoiseGyrBs = 3. / 3600. * DEG2RAD; // Bias Stability
uint8_t allowStr = false; uint8_t allowStr = true;
} kalmanFilterParameters; } kalmanFilterParameters;
struct MagnetorquerParameter { struct MagnetorquerParameter {

View File

@@ -29,6 +29,20 @@ void AttitudeEstimation::quest(acsctrl::SusDataProcessed *susData,
VectorOperations<double>::normalize(mgmData->mgmVecTot.value, normMgmB, 3); VectorOperations<double>::normalize(mgmData->mgmVecTot.value, normMgmB, 3);
VectorOperations<double>::normalize(mgmData->magIgrfModel.value, normMgmI, 3); VectorOperations<double>::normalize(mgmData->magIgrfModel.value, normMgmI, 3);
if ((std::acos(VectorOperations<double>::dot(normSusB, normMgmB)) <
acsParameters->onBoardParams.questAngleLimit) or
(std::acos(VectorOperations<double>::dot(normSusI, normMgmI)) <
acsParameters->onBoardParams.questAngleLimit)) {
{
PoolReadGuard pg{attitudeEstimationData};
if (pg.getReadResult() == returnvalue::OK) {
std::memcpy(attitudeEstimationData->quatQuest.value, ZERO_VEC4, 4 * sizeof(double));
attitudeEstimationData->quatQuest.setValid(false);
}
}
return;
}
// Create Helper Vectors // Create Helper Vectors
double normHelperB[3] = {0, 0, 0}, normHelperI[3] = {0, 0, 0}, helperCross[3] = {0, 0, 0}, double normHelperB[3] = {0, 0, 0}, normHelperI[3] = {0, 0, 0}, helperCross[3] = {0, 0, 0},
helperSum[3] = {0, 0, 0}; helperSum[3] = {0, 0, 0};

View File

@@ -19,13 +19,9 @@ void FusedRotationEstimation::estimateFusedRotationRate(
acsParameters->onBoardParams.fusedRateFromStr)) { acsParameters->onBoardParams.fusedRateFromStr)) {
PoolReadGuard pg(fusedRotRateData); PoolReadGuard pg(fusedRotRateData);
if (pg.getReadResult() == returnvalue::OK) { if (pg.getReadResult() == returnvalue::OK) {
std::memcpy(fusedRotRateData->rotRateOrthogonal.value, ZERO_VEC3, 3 * sizeof(double)); std::memcpy(fusedRotRateData->rotRateTotalSource.value,
fusedRotRateData->rotRateOrthogonal.setValid(false);
std::memcpy(fusedRotRateData->rotRateParallel.value, ZERO_VEC3, 3 * sizeof(double));
fusedRotRateData->rotRateParallel.setValid(false);
std::memcpy(fusedRotRateData->rotRateTotal.value,
fusedRotRateSourcesData->rotRateTotalStr.value, 3 * sizeof(double)); fusedRotRateSourcesData->rotRateTotalStr.value, 3 * sizeof(double));
fusedRotRateData->rotRateTotal.setValid(true); fusedRotRateData->rotRateTotalSource.setValid(true);
fusedRotRateData->rotRateSource.value = acs::rotrate::Source::STR; fusedRotRateData->rotRateSource.value = acs::rotrate::Source::STR;
fusedRotRateData->rotRateSource.setValid(true); fusedRotRateData->rotRateSource.setValid(true);
} }
@@ -34,41 +30,38 @@ void FusedRotationEstimation::estimateFusedRotationRate(
acsParameters->onBoardParams.fusedRateFromQuest)) { acsParameters->onBoardParams.fusedRateFromQuest)) {
PoolReadGuard pg(fusedRotRateData); PoolReadGuard pg(fusedRotRateData);
if (pg.getReadResult() == returnvalue::OK) { if (pg.getReadResult() == returnvalue::OK) {
std::memcpy(fusedRotRateData->rotRateOrthogonal.value, ZERO_VEC3, 3 * sizeof(double)); std::memcpy(fusedRotRateData->rotRateTotalSource.value,
fusedRotRateData->rotRateOrthogonal.setValid(false);
std::memcpy(fusedRotRateData->rotRateParallel.value, ZERO_VEC3, 3 * sizeof(double));
fusedRotRateData->rotRateParallel.setValid(false);
std::memcpy(fusedRotRateData->rotRateTotal.value,
fusedRotRateSourcesData->rotRateTotalQuest.value, 3 * sizeof(double)); fusedRotRateSourcesData->rotRateTotalQuest.value, 3 * sizeof(double));
fusedRotRateData->rotRateTotal.setValid(true); fusedRotRateData->rotRateTotalSource.setValid(true);
fusedRotRateData->rotRateSource.value = acs::rotrate::Source::QUEST; fusedRotRateData->rotRateSource.value = acs::rotrate::Source::QUEST;
fusedRotRateData->rotRateSource.setValid(true); fusedRotRateData->rotRateSource.setValid(true);
} }
} else if (fusedRotRateSourcesData->rotRateTotalSusMgm.isValid()) { } else if (fusedRotRateSourcesData->rotRateTotalSusMgm.isValid()) {
std::memcpy(fusedRotRateData->rotRateOrthogonal.value, std::memcpy(fusedRotRateData->rotRateTotalSource.value,
fusedRotRateSourcesData->rotRateOrthogonalSusMgm.value, 3 * sizeof(double));
fusedRotRateData->rotRateOrthogonal.setValid(
fusedRotRateSourcesData->rotRateOrthogonalSusMgm.isValid());
std::memcpy(fusedRotRateData->rotRateParallel.value,
fusedRotRateSourcesData->rotRateParallelSusMgm.value, 3 * sizeof(double));
fusedRotRateData->rotRateParallel.setValid(
fusedRotRateSourcesData->rotRateParallelSusMgm.isValid());
std::memcpy(fusedRotRateData->rotRateTotal.value,
fusedRotRateSourcesData->rotRateTotalSusMgm.value, 3 * sizeof(double)); fusedRotRateSourcesData->rotRateTotalSusMgm.value, 3 * sizeof(double));
fusedRotRateData->rotRateTotal.setValid(true); fusedRotRateData->rotRateTotalSource.setValid(true);
fusedRotRateData->rotRateSource.value = acs::rotrate::Source::SUSMGM; fusedRotRateData->rotRateSource.value = acs::rotrate::Source::SUSMGM;
fusedRotRateData->rotRateSource.setValid(true); fusedRotRateData->rotRateSource.setValid(true);
} else { } else {
PoolReadGuard pg(fusedRotRateData); PoolReadGuard pg(fusedRotRateData);
if (pg.getReadResult() == returnvalue::OK) { if (pg.getReadResult() == returnvalue::OK) {
std::memcpy(fusedRotRateData->rotRateOrthogonal.value, ZERO_VEC3, 3 * sizeof(double)); std::memcpy(fusedRotRateData->rotRateTotalSource.value, ZERO_VEC3, 3 * sizeof(double));
std::memcpy(fusedRotRateData->rotRateParallel.value, ZERO_VEC3, 3 * sizeof(double)); fusedRotRateData->rotRateTotalSource.setValid(false);
std::memcpy(fusedRotRateData->rotRateTotal.value, ZERO_VEC3, 3 * sizeof(double));
fusedRotRateData->setValidity(false, true);
fusedRotRateData->rotRateSource.value = acs::rotrate::Source::NONE; fusedRotRateData->rotRateSource.value = acs::rotrate::Source::NONE;
fusedRotRateData->rotRateSource.setValid(true); fusedRotRateData->rotRateSource.setValid(true);
} }
} }
if (fusedRotRateSourcesData->rotRateTotalSusMgm.isValid()) {
std::memcpy(fusedRotRateData->rotRateTotalSusMgm.value,
fusedRotRateSourcesData->rotRateTotalSusMgm.value, 3 * sizeof(double));
fusedRotRateData->rotRateTotalSusMgm.setValid(true);
} else {
PoolReadGuard pg(fusedRotRateData);
if (pg.getReadResult() == returnvalue::OK) {
std::memcpy(fusedRotRateData->rotRateTotalSusMgm.value, ZERO_VEC3, 3 * sizeof(double));
fusedRotRateData->rotRateTotalSusMgm.setValid(false);
}
}
} }
void FusedRotationEstimation::estimateFusedRotationRateStr( void FusedRotationEstimation::estimateFusedRotationRateStr(

View File

@@ -232,6 +232,7 @@ void Guidance::targetRotationRate(const double timeDelta, double quatIX[4], doub
} }
if (timeDelta != 0.0) { if (timeDelta != 0.0) {
QuaternionOperations::rotationFromQuaternions(quatIX, quatIXprev, timeDelta, refSatRate); QuaternionOperations::rotationFromQuaternions(quatIX, quatIXprev, timeDelta, refSatRate);
VectorOperations<double>::mulScalar(refSatRate, -1, refSatRate, 3);
} else { } else {
std::memcpy(refSatRate, ZERO_VEC3, 3 * sizeof(double)); std::memcpy(refSatRate, ZERO_VEC3, 3 * sizeof(double));
} }
@@ -315,9 +316,9 @@ void Guidance::comparePtg(double currentQuat[4], double currentSatRotRate[3], do
// Calculate error satellite rotational rate // Calculate error satellite rotational rate
// Convert target rotational rate into body RF // Convert target rotational rate into body RF
double errorQuatInv[4] = {0, 0, 0, 0}, targetSatRotRateB[3] = {0, 0, 0}; double targetSatRotRateB[3] = {0, 0, 0};
QuaternionOperations::inverse(errorQuat, errorQuatInv); QuaternionOperations::multiplyVector(currentQuat, targetSatRotRate, targetSatRotRateB);
QuaternionOperations::multiplyVector(errorQuatInv, targetSatRotRate, targetSatRotRateB); VectorOperations<double>::copy(targetSatRotRateB, targetSatRotRate, 3);
// Combine the target and reference satellite rotational rates // Combine the target and reference satellite rotational rates
double combinedRefSatRotRate[3] = {0, 0, 0}; double combinedRefSatRotRate[3] = {0, 0, 0};
VectorOperations<double>::add(targetSatRotRate, refSatRotRate, combinedRefSatRotRate, 3); VectorOperations<double>::add(targetSatRotRate, refSatRotRate, combinedRefSatRotRate, 3);

View File

@@ -114,12 +114,13 @@ ReturnValue_t MultiplicativeKalmanFilter::mekfEst(
return result; return result;
} }
double measSensMatrix[matrixDimensionFactor][6] = {{0}}, double measSensMatrix[matrixDimensionFactor][6] = {},
measCovMatrix[matrixDimensionFactor][matrixDimensionFactor] = {{0}}, measCovMatrix[matrixDimensionFactor][matrixDimensionFactor] = {},
measVec[matrixDimensionFactor] = {0}, estVec[matrixDimensionFactor] = {0}; measVec[matrixDimensionFactor] = {}, estVec[matrixDimensionFactor] = {};
kfUpdate(susData, mgmData, *measSensMatrix, *measCovMatrix, measVec, estVec); kfUpdate(susData, mgmData, *measSensMatrix, *measCovMatrix, measVec, estVec);
double kalmanGain[6][matrixDimensionFactor] = {{0}}; double kalmanGain[6][matrixDimensionFactor];
std::memset(kalmanGain, 0, sizeof(kalmanGain));
result = kfGain(*measSensMatrix, *measCovMatrix, *kalmanGain, attitudeEstimationData); result = kfGain(*measSensMatrix, *measCovMatrix, *kalmanGain, attitudeEstimationData);
if (result != returnvalue::OK) { if (result != returnvalue::OK) {
reset(attitudeEstimationData); reset(attitudeEstimationData);
@@ -342,10 +343,11 @@ ReturnValue_t MultiplicativeKalmanFilter::kfGain(
double *measSensMatrix, double *measCovMatrix, double *kalmanGain, double *measSensMatrix, double *measCovMatrix, double *kalmanGain,
acsctrl::AttitudeEstimationData *attitudeEstimationData) { acsctrl::AttitudeEstimationData *attitudeEstimationData) {
// Kalman Gain: K = P * H' / (H * P * H' + R) // Kalman Gain: K = P * H' / (H * P * H' + R)
double kalmanGainDen[matrixDimensionFactor][matrixDimensionFactor] = {{0}}, double kalmanGainDen[matrixDimensionFactor][matrixDimensionFactor] = {},
invKalmanGainDen[matrixDimensionFactor][matrixDimensionFactor] = {{0}}, invKalmanGainDen[matrixDimensionFactor][matrixDimensionFactor] = {};
residualCov[6][matrixDimensionFactor] = {{0}}, double residualCov[6][matrixDimensionFactor], measSensMatrixTransposed[6][matrixDimensionFactor];
measSensMatrixTransposed[6][matrixDimensionFactor] = {{0}}; std::memset(residualCov, 0, sizeof(residualCov));
std::memset(measSensMatrixTransposed, 0, sizeof(measSensMatrixTransposed));
MatrixOperations<double>::transpose(measSensMatrix, *measSensMatrixTransposed, MatrixOperations<double>::transpose(measSensMatrix, *measSensMatrixTransposed,
matrixDimensionFactor, 6); matrixDimensionFactor, 6);
@@ -382,8 +384,7 @@ void MultiplicativeKalmanFilter::kfCovAposteriori(double *kalmanGain, double *me
void MultiplicativeKalmanFilter::kfStateAposteriori(double *kalmanGain, double *measVec, void MultiplicativeKalmanFilter::kfStateAposteriori(double *kalmanGain, double *measVec,
double *estVec) { double *estVec) {
double stateVecErr[6] = {0, 0, 0, 0, 0, 0}; double stateVecErr[6] = {0, 0, 0, 0, 0, 0}, plantOutputDiff[matrixDimensionFactor] = {};
double plantOutputDiff[matrixDimensionFactor] = {0};
VectorOperations<double>::subtract(measVec, estVec, plantOutputDiff, matrixDimensionFactor); VectorOperations<double>::subtract(measVec, estVec, plantOutputDiff, matrixDimensionFactor);
MatrixOperations<double>::multiply(kalmanGain, plantOutputDiff, stateVecErr, 6, MatrixOperations<double>::multiply(kalmanGain, plantOutputDiff, stateVecErr, 6,
matrixDimensionFactor, 1); matrixDimensionFactor, 1);

View File

@@ -129,9 +129,8 @@ enum PoolIds : lp_id_t {
RW_TARGET_SPEED, RW_TARGET_SPEED,
MTQ_TARGET_DIPOLE, MTQ_TARGET_DIPOLE,
// Fused Rotation Rate // Fused Rotation Rate
ROT_RATE_ORTHOGONAL, ROT_RATE_TOT_SUSMGM,
ROT_RATE_PARALLEL, ROT_RATE_TOT_SOURCE,
ROT_RATE_TOTAL,
ROT_RATE_SOURCE, ROT_RATE_SOURCE,
// Fused Rotation Rate Sources // Fused Rotation Rate Sources
ROT_RATE_ORTHOGONAL_SUSMGM, ROT_RATE_ORTHOGONAL_SUSMGM,
@@ -151,7 +150,7 @@ static constexpr uint8_t GPS_SET_PROCESSED_ENTRIES = 6;
static constexpr uint8_t ATTITUDE_ESTIMATION_SET_ENTRIES = 4; static constexpr uint8_t ATTITUDE_ESTIMATION_SET_ENTRIES = 4;
static constexpr uint8_t CTRL_VAL_SET_ENTRIES = 5; static constexpr uint8_t CTRL_VAL_SET_ENTRIES = 5;
static constexpr uint8_t ACT_CMD_SET_ENTRIES = 3; static constexpr uint8_t ACT_CMD_SET_ENTRIES = 3;
static constexpr uint8_t FUSED_ROT_RATE_SET_ENTRIES = 4; static constexpr uint8_t FUSED_ROT_RATE_SET_ENTRIES = 3;
static constexpr uint8_t FUSED_ROT_RATE_SOURCES_SET_ENTRIES = 5; static constexpr uint8_t FUSED_ROT_RATE_SOURCES_SET_ENTRIES = 5;
/** /**
@@ -318,10 +317,10 @@ class FusedRotRateData : public StaticLocalDataSet<FUSED_ROT_RATE_SET_ENTRIES> {
FusedRotRateData(HasLocalDataPoolIF* hkOwner) FusedRotRateData(HasLocalDataPoolIF* hkOwner)
: StaticLocalDataSet(hkOwner, FUSED_ROTATION_RATE_DATA) {} : StaticLocalDataSet(hkOwner, FUSED_ROTATION_RATE_DATA) {}
lp_vec_t<double, 3> rotRateOrthogonal = lp_vec_t<double, 3> rotRateTotalSusMgm =
lp_vec_t<double, 3>(sid.objectId, ROT_RATE_ORTHOGONAL, this); lp_vec_t<double, 3>(sid.objectId, ROT_RATE_TOT_SUSMGM, this);
lp_vec_t<double, 3> rotRateParallel = lp_vec_t<double, 3>(sid.objectId, ROT_RATE_PARALLEL, this); lp_vec_t<double, 3> rotRateTotalSource =
lp_vec_t<double, 3> rotRateTotal = lp_vec_t<double, 3>(sid.objectId, ROT_RATE_TOTAL, this); lp_vec_t<double, 3>(sid.objectId, ROT_RATE_TOT_SOURCE, this);
lp_var_t<uint8_t> rotRateSource = lp_var_t<uint8_t>(sid.objectId, ROT_RATE_SOURCE, this); lp_var_t<uint8_t> rotRateSource = lp_var_t<uint8_t>(sid.objectId, ROT_RATE_SOURCE, this);
private: private:

View File

@@ -8,7 +8,7 @@
class SdCardMountedIF { class SdCardMountedIF {
public: public:
virtual ~SdCardMountedIF(){}; virtual ~SdCardMountedIF() {};
virtual const char* getCurrentMountPrefix() const = 0; virtual const char* getCurrentMountPrefix() const = 0;
virtual bool isSdCardUsable(std::optional<sd::SdCard> sdCard) = 0; virtual bool isSdCardUsable(std::optional<sd::SdCard> sdCard) = 0;
virtual std::optional<sd::SdCard> getPreferredSdCard() const = 0; virtual std::optional<sd::SdCard> getPreferredSdCard() const = 0;

View File

@@ -32,8 +32,8 @@ class BpxBatteryHandler : public DeviceHandlerBase {
BpxBatteryHk hkSet; BpxBatteryHk hkSet;
DeviceCommandId_t lastCmd = DeviceHandlerIF::NO_COMMAND_ID; DeviceCommandId_t lastCmd = DeviceHandlerIF::NO_COMMAND_ID;
BpxBatteryCfg cfgSet;
std::array<uint8_t, 8> cmdBuf = {}; std::array<uint8_t, 8> cmdBuf = {};
BpxBatteryCfg cfgSet;
PoolEntry<uint16_t> chargeCurrent = PoolEntry<uint16_t>({0}); PoolEntry<uint16_t> chargeCurrent = PoolEntry<uint16_t>({0});
PoolEntry<uint16_t> dischargeCurrent = PoolEntry<uint16_t>({0}); PoolEntry<uint16_t> dischargeCurrent = PoolEntry<uint16_t>({0});
PoolEntry<uint16_t> heaterCurrent = PoolEntry<uint16_t>({0}); PoolEntry<uint16_t> heaterCurrent = PoolEntry<uint16_t>({0});

View File

@@ -199,6 +199,7 @@ class BpxBatteryHk : public StaticLocalDataSet<bpxBat::HK_ENTRIES> {
private: private:
friend class BpxBatteryHandler; friend class BpxBatteryHandler;
friend class BatteryDummy;
/** /**
* Constructor for data creator * Constructor for data creator
* @param hkOwner * @param hkOwner
@@ -238,6 +239,7 @@ class BpxBatteryCfg : public StaticLocalDataSet<bpxBat::CFG_ENTRIES> {
private: private:
friend class BpxBatteryHandler; friend class BpxBatteryHandler;
friend class BatteryDummy;
/** /**
* Constructor for data creator * Constructor for data creator
* @param hkOwner * @param hkOwner

View File

@@ -105,7 +105,7 @@ Subsystem& satsystem::acs::init() {
}; };
// Build TARGET PT transition 0 // Build TARGET PT transition 0
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TRANS_0.second); iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TRANS_0.second);
iht(objects::SUS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_PTG_TRANS_0.second, true); iht(objects::SUS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_PTG_TRANS_0.second, true);
iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_PTG_TRANS_0.second, true); iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_PTG_TRANS_0.second, true);
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_PTG_TRANS_0.second); iht(objects::RW_ASSY, NML, 0, ACS_TABLE_PTG_TRANS_0.second);
iht(objects::STR_ASSY, NML, 0, ACS_TABLE_PTG_TRANS_0.second); iht(objects::STR_ASSY, NML, 0, ACS_TABLE_PTG_TRANS_0.second);
@@ -114,7 +114,7 @@ Subsystem& satsystem::acs::init() {
ctxc); ctxc);
// Build SUS board transition // Build SUS board transition
iht(objects::SUS_BOARD_ASS, NML, duallane::A_SIDE, SUS_BOARD_NML_TRANS.second, true); iht(objects::SUS_BOARD_ASS, NML, duallane::B_SIDE, SUS_BOARD_NML_TRANS.second, true);
check(ACS_SUBSYSTEM.addTable(TableEntry(SUS_BOARD_NML_TRANS.first, &SUS_BOARD_NML_TRANS.second)), check(ACS_SUBSYSTEM.addTable(TableEntry(SUS_BOARD_NML_TRANS.first, &SUS_BOARD_NML_TRANS.second)),
ctxc); ctxc);
@@ -200,14 +200,14 @@ void buildSafeSequence(Subsystem& ss, ModeListEntry& eh) {
iht(objects::ACS_CONTROLLER, acs::AcsMode::SAFE, acs::SafeSubmode::DEFAULT, iht(objects::ACS_CONTROLLER, acs::AcsMode::SAFE, acs::SafeSubmode::DEFAULT,
ACS_TABLE_SAFE_TGT.second, true); ACS_TABLE_SAFE_TGT.second, true);
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_SAFE_TGT.second); iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_SAFE_TGT.second);
iht(objects::SUS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_SAFE_TGT.second, true); iht(objects::SUS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_SAFE_TGT.second, true);
iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_SAFE_TGT.second, true); iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_SAFE_TGT.second, true);
check(ss.addTable(&ACS_TABLE_SAFE_TGT.second, ACS_TABLE_SAFE_TGT.first, false, true), ctxc); check(ss.addTable(&ACS_TABLE_SAFE_TGT.second, ACS_TABLE_SAFE_TGT.first, false, true), ctxc);
// Build SAFE transition 0 // Build SAFE transition 0
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_SAFE_TRANS_0.second); iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_SAFE_TRANS_0.second);
iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_SAFE_TRANS_0.second, true); iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_SAFE_TRANS_0.second, true);
iht(objects::SUS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_SAFE_TRANS_0.second, true); iht(objects::SUS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_SAFE_TRANS_0.second, true);
iht(objects::STR_ASSY, OFF, 0, ACS_TABLE_SAFE_TRANS_0.second); iht(objects::STR_ASSY, OFF, 0, ACS_TABLE_SAFE_TRANS_0.second);
iht(objects::RW_ASSY, OFF, 0, ACS_TABLE_SAFE_TRANS_0.second); iht(objects::RW_ASSY, OFF, 0, ACS_TABLE_SAFE_TRANS_0.second);
check(ss.addTable(&ACS_TABLE_SAFE_TRANS_0.second, ACS_TABLE_SAFE_TRANS_0.first, false, true), check(ss.addTable(&ACS_TABLE_SAFE_TRANS_0.second, ACS_TABLE_SAFE_TRANS_0.first, false, true),
@@ -257,14 +257,14 @@ void buildIdleSequence(Subsystem& ss, ModeListEntry& eh) {
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_IDLE_TGT.second); iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_IDLE_TGT.second);
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_IDLE_TGT.second); iht(objects::RW_ASSY, NML, 0, ACS_TABLE_IDLE_TGT.second);
iht(objects::STR_ASSY, NML, 0, ACS_TABLE_IDLE_TGT.second); iht(objects::STR_ASSY, NML, 0, ACS_TABLE_IDLE_TGT.second);
iht(objects::SUS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_IDLE_TGT.second, true); iht(objects::SUS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_IDLE_TGT.second, true);
iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_IDLE_TGT.second, true); iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_IDLE_TGT.second, true);
ss.addTable(&ACS_TABLE_IDLE_TGT.second, ACS_TABLE_IDLE_TGT.first, false, true); ss.addTable(&ACS_TABLE_IDLE_TGT.second, ACS_TABLE_IDLE_TGT.first, false, true);
// Build IDLE transition 0 // Build IDLE transition 0
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_IDLE_TRANS_0.second); iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_IDLE_TRANS_0.second);
iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_IDLE_TRANS_0.second, true); iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_IDLE_TRANS_0.second, true);
iht(objects::SUS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_IDLE_TRANS_0.second, true); iht(objects::SUS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_IDLE_TRANS_0.second, true);
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_IDLE_TRANS_0.second); iht(objects::RW_ASSY, NML, 0, ACS_TABLE_IDLE_TRANS_0.second);
iht(objects::STR_ASSY, NML, 0, ACS_TABLE_IDLE_TRANS_0.second); iht(objects::STR_ASSY, NML, 0, ACS_TABLE_IDLE_TRANS_0.second);
ss.addTable(&ACS_TABLE_IDLE_TRANS_0.second, ACS_TABLE_IDLE_TRANS_0.first, false, true); ss.addTable(&ACS_TABLE_IDLE_TRANS_0.second, ACS_TABLE_IDLE_TRANS_0.first, false, true);
@@ -307,7 +307,7 @@ void buildTargetPtSequence(Subsystem& ss, ModeListEntry& eh) {
// Build TARGET PT table // Build TARGET PT table
iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_TARGET, 0, ACS_TABLE_PTG_TARGET_TGT.second); iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_TARGET, 0, ACS_TABLE_PTG_TARGET_TGT.second);
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_TGT.second); iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_TGT.second);
iht(objects::SUS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_PTG_TARGET_TGT.second, true); iht(objects::SUS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_PTG_TARGET_TGT.second, true);
iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_PTG_TARGET_TGT.second, true); iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_PTG_TARGET_TGT.second, true);
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_TGT.second); iht(objects::RW_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_TGT.second);
iht(objects::STR_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_TGT.second); iht(objects::STR_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_TGT.second);
@@ -356,7 +356,7 @@ void buildTargetPtNadirSequence(Subsystem& ss, ModeListEntry& eh) {
// Build TARGET PT table // Build TARGET PT table
iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_NADIR, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second); iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_NADIR, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second);
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second); iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second);
iht(objects::SUS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_PTG_TARGET_NADIR_TGT.second, true); iht(objects::SUS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_PTG_TARGET_NADIR_TGT.second, true);
iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_PTG_TARGET_NADIR_TGT.second, true); iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_PTG_TARGET_NADIR_TGT.second, true);
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second); iht(objects::RW_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second);
iht(objects::STR_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second); iht(objects::STR_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second);
@@ -409,7 +409,7 @@ void buildTargetPtGsSequence(Subsystem& ss, ModeListEntry& eh) {
// Build TARGET PT table // Build TARGET PT table
iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_TARGET_GS, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second); iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_TARGET_GS, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second);
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second); iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second);
iht(objects::SUS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_PTG_TARGET_GS_TGT.second, true); iht(objects::SUS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_PTG_TARGET_GS_TGT.second, true);
iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_PTG_TARGET_GS_TGT.second, true); iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_PTG_TARGET_GS_TGT.second, true);
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second); iht(objects::RW_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second);
iht(objects::STR_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second); iht(objects::STR_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second);
@@ -462,7 +462,7 @@ void buildTargetPtInertialSequence(Subsystem& ss, ModeListEntry& eh) {
iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_INERTIAL, 0, iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_INERTIAL, 0,
ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second); ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second);
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second); iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second);
iht(objects::SUS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second, iht(objects::SUS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second,
true); true);
iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second, iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second,
true); true);

View File

@@ -59,7 +59,7 @@ ReturnValue_t PersistentTmStore::buildDumpSet(uint32_t fromUnixSeconds, uint32_t
continue; continue;
} }
const path& file = fileOrDir.path(); const path& file = fileOrDir.path();
struct tm fileTime {}; struct tm fileTime{};
if (pathToTime(file, fileTime) != returnvalue::OK) { if (pathToTime(file, fileTime) != returnvalue::OK) {
sif::error << "Time extraction for file " << file << "failed" << std::endl; sif::error << "Time extraction for file " << file << "failed" << std::endl;
continue; continue;
@@ -294,7 +294,7 @@ void PersistentTmStore::deleteFromUpTo(uint32_t startUnixTime, uint32_t endUnixT
continue; continue;
} }
// Convert file time to the UNIX epoch // Convert file time to the UNIX epoch
struct tm fileTime {}; struct tm fileTime{};
if (pathToTime(file.path(), fileTime) != returnvalue::OK) { if (pathToTime(file.path(), fileTime) != returnvalue::OK) {
sif::error << "Time extraction for " << file << " failed" << std::endl; sif::error << "Time extraction for " << file << " failed" << std::endl;
continue; continue;

View File

@@ -29,7 +29,7 @@ else
echo "No ${cmake_fmt} tool found, not formatting CMake files" echo "No ${cmake_fmt} tool found, not formatting CMake files"
fi fi
cpp_format="clang-format" cpp_format="clang-format-19"
file_selectors="( -iname *.h -o -iname *.cpp -o -iname *.c -o -iname *.tpp )" file_selectors="( -iname *.h -o -iname *.cpp -o -iname *.c -o -iname *.tpp )"
file_excludes="( -not -iname translateObjects.cpp -not -iname translateEvents.cpp )" file_excludes="( -not -iname translateObjects.cpp -not -iname translateEvents.cpp )"
if command -v ${cpp_format} &> /dev/null; then if command -v ${cpp_format} &> /dev/null; then

View File

@@ -84,6 +84,8 @@ def build_cmd(args):
cmd = "scp " cmd = "scp "
if args.recursive: if args.recursive:
cmd += "-r " cmd += "-r "
# Necessary to avoid some errors related to SFTP server of OBSW.
cmd += "-O "
address = "" address = ""
port_args = "" port_args = ""
target = args.target target = args.target
@@ -99,7 +101,7 @@ def build_cmd(args):
target = args.target target = args.target
else: else:
if target == "": if target == "":
target = f"/tmp" target = "/tmp"
else: else:
target = args.target target = args.target
# accepted_key_rsa_args = "-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa" # accepted_key_rsa_args = "-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"

2
tmtc

Submodule tmtc updated: 5e1b12fa52...82b388e23e