Compare commits

...

137 Commits

Author SHA1 Message Date
e10359077c finally works
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-04-04 14:01:13 +02:00
8d1db69e0d annoying 2023-04-04 13:48:50 +02:00
8a2137d5d3 another test 2023-04-04 13:46:21 +02:00
e47ba65550 another test 2023-04-04 13:45:12 +02:00
143fb44037 try something 2023-04-04 13:41:55 +02:00
18994f5e65 Merge pull request 'prep v1.43.0' (#560) from prep_v1.43.0 into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #560
2023-04-04 13:33:06 +02:00
39a3b4aa6f prep v1.43.0
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-develop Build queued...
2023-04-04 13:32:41 +02:00
2b18ab1504 Merge pull request 'Bugfixes ans tweaks for STR' (#559) from bugfixes_tweaks_str into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #559
2023-04-04 11:22:49 +02:00
83e0627548 Merge remote-tracking branch 'origin/develop' into bugfixes_tweaks_str
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build queued...
2023-04-04 11:22:07 +02:00
152a3c20cf bump submodules
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-develop Build queued...
2023-04-04 11:20:03 +02:00
9e8880c2c5 Merge remote-tracking branch 'origin/develop' into bugfixes_tweaks_str 2023-04-04 11:19:34 +02:00
ed8623259e Merge pull request 'Feature: 3V3 stack power switching' (#556) from feature_3v3_stack_switching into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #556
2023-04-04 11:18:57 +02:00
69a3cb20be Merge remote-tracking branch 'origin/develop' into feature_3v3_stack_switching
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build queued...
2023-04-04 11:18:45 +02:00
01b98ca091 Merge pull request 'tweaks' (#558) from single_store_tweak_fsfw into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #558
2023-04-04 11:15:49 +02:00
0cd246182d bump fsfw
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build started...
2023-04-04 01:52:34 +02:00
9270165bf8 fix STR bugs and improve code
- Reset reply size after returning a reply
- Reset data link layer and flush RX for regular commands and before
  performing special commands to ensure consistent start state
- Clean up DHB a bit
- Set STR dev to OFF in assembly when it is faulty.
2023-04-04 01:35:05 +02:00
9aedc36e4d tweaks
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
- Bump fsfw: O_SYNC flag on UioMapper
- Reduce delay for single TM store task to 2 ms
2023-04-03 21:57:48 +02:00
f5588e9c62 Merge remote-tracking branch 'origin/develop' into feature_3v3_stack_switching
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-04-03 19:58:35 +02:00
afbab6d3f2 Merge pull request 'Bugfix for GPS health devices' (#555) from bugfix_gps_health_dev_connect_parent into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #555
2023-04-03 19:57:50 +02:00
6d0bd88cd9 changelog
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build queued...
2023-04-03 19:57:16 +02:00
23af9685d6 bugfix
Some checks are pending
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop Build started...
2023-04-03 19:15:14 +02:00
a26d71f745 i hate this crap
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-04-03 19:04:21 +02:00
8404ce237b something is wrong now
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-04-03 18:54:47 +02:00
1610bdecf9 connect parent
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-04-03 18:02:45 +02:00
53c88f85d5 changelog update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-04-03 16:58:48 +02:00
ac514d9c19 bump tmtc
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-04-03 16:57:12 +02:00
e6f0695e1e bump tmtc
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-04-03 16:55:37 +02:00
6b37d292c6 add 3v3 stack switching
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-04-03 16:25:32 +02:00
e3677f89fe Merge pull request 'IMTQ: Lower Integration Time' (#552) from imtq_lower_integration_time into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #552
2023-04-03 15:43:30 +02:00
5267bfcd82 Merge remote-tracking branch 'origin/develop' into imtq_lower_integration_time
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build queued...
2023-04-03 15:34:51 +02:00
99eae0df51 update changelog
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build queued...
2023-04-03 15:31:46 +02:00
73e2508025 Merge pull request 'remove double lock' (#554) from bugfix_axi_ptme_lock into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #554
2023-04-03 15:30:36 +02:00
1b2dd12e61 remove double lock
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-develop Build queued...
2023-04-03 15:29:18 +02:00
8585114041 missing state check
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build started...
2023-04-03 15:27:06 +02:00
c4f62842ab Merge remote-tracking branch 'origin/develop' into imtq_lower_integration_time
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-04-03 15:21:00 +02:00
800ab7e87f Merge pull request 'disable some printouts' (#553) from tweaks_tcs into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #553
2023-04-03 15:20:32 +02:00
11d9871c0a disable some printouts
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
2023-04-03 15:20:11 +02:00
958abadd65 somethings buggy
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-04-03 15:16:53 +02:00
fba856a9a9 Merge branch 'develop' into imtq_lower_integration_time
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-04-03 15:13:00 +02:00
bc582abcb3 Merge pull request 'Thermal Controller Update' (#399) from thermal_controller into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #399
2023-04-03 15:12:48 +02:00
ba7a2c3ece Merge branch 'develop' into thermal_controller
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build started...
2023-04-03 15:12:30 +02:00
a8a0299b46 some adaptions, heater to off seems to work
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-04-03 14:38:00 +02:00
f4b47a24c0 adaptions for EM build
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-04-03 14:22:58 +02:00
e9c5bfe324 event spam has stopped
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-04-03 14:09:54 +02:00
5dcafa1de0 lower integration time
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-04-03 10:12:19 +02:00
7522eac9eb done 2023-04-02 23:43:41 +02:00
847e3bb51d prep imtq startup handling 2023-04-02 20:12:24 +02:00
020dfa8278 Merge pull request 'add compatible firmware' (#551) from ptme_poll_threshold_register into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #551
2023-04-02 15:52:29 +02:00
389b77a092 Merge branch 'develop' into ptme_poll_threshold_register
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build queued...
2023-04-02 15:52:17 +02:00
a31f8c934a add compatible firmware
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
2023-04-02 15:51:55 +02:00
685a4caace Merge pull request 'add SW IF for manipulating poll threshold' (#550) from ptme_poll_threshold_register into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #550
2023-04-02 15:35:39 +02:00
9360dad028 changelog
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build queued...
2023-04-02 15:34:52 +02:00
8eac0b5ebd changelog
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build started...
2023-04-02 15:33:49 +02:00
703eaaa9aa poll threshold param cmd handling
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build started...
2023-04-02 15:32:04 +02:00
cab55c79dc add SW IF for manipulating poll threshold
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-04-02 14:22:52 +02:00
62952b89b1 Merge remote-tracking branch 'origin/develop' into thermal_controller
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-04-01 16:00:15 +02:00
b205fb5269 bump changelog
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-04-01 15:55:37 +02:00
959f37f25a changelog format fix 2023-04-01 15:55:23 +02:00
d1775a52aa Merge remote-tracking branch 'origin/develop' into thermal_controller
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-31 19:18:05 +02:00
def7eca2f2 cleaning up a bit
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-28 19:38:02 +02:00
520b41c53b transition basic mode handling
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2023-03-28 17:21:43 +02:00
28d7dcf177 Merge remote-tracking branch 'origin/develop' into thermal_controller
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2023-03-28 16:37:09 +02:00
36d7852c1d changes
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-28 16:35:49 +02:00
5c97020087 small change
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-28 15:11:21 +02:00
861bee8083 Merge branch 'develop' into thermal_controller
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-26 16:58:30 +02:00
3e7901f060 Merge remote-tracking branch 'origin/develop' into thermal_controller
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2023-03-26 16:52:39 +02:00
0301c18af2 resolve some merge conflicts
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-24 21:20:27 +01:00
f71972609c Merge remote-tracking branch 'origin/develop' into thermal_controller
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2023-03-24 21:15:29 +01:00
9c8fc84053 Merge remote-tracking branch 'origin/develop' into thermal_controller
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-21 23:44:25 +01:00
2153294e6f EM build working now
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-21 15:17:31 +01:00
0fdc79df5e Merge remote-tracking branch 'origin/develop' into thermal_controller
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-21 14:55:55 +01:00
0e5a3a2f6c update changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-21 14:46:07 +01:00
b81618344e update eive system FDIR
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-21 14:38:10 +01:00
d85ddcdbff Merge remote-tracking branch 'origin/develop' into thermal_controller
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-21 14:18:57 +01:00
092e9fa508 bump deps 2023-03-21 14:18:32 +01:00
ba9cf5d79d small changes
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-18 18:03:59 +01:00
4871479ed5 fixes for q7s build
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-18 11:17:24 +01:00
eb46841237 update thermal controller
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2023-03-17 17:40:11 +01:00
d44142ac26 Merge remote-tracking branch 'origin/develop' into thermal_controller
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2023-03-17 17:36:51 +01:00
f7be8ea63c use supervisor fdir
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
controls the power switch
2023-03-16 19:10:05 +01:00
3c6eb265c7 PLOC SUPV dummy has switch now
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2023-03-16 18:52:32 +01:00
b1d2f73b01 move Switches enum
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2023-03-16 18:47:51 +01:00
eda1f7e212 syrlinks event works
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-16 18:28:51 +01:00
56a4378a63 that should be transition safe
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-16 18:05:23 +01:00
a16671762d Merge remote-tracking branch 'origin/develop' into thermal_controller
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-16 17:48:17 +01:00
350ed59033 handle syrlinks overheating in COM SS
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-15 17:13:25 +01:00
096253a9a3 Merge branch 'feature_scheduling_tweaks' into thermal_controller
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-15 16:25:13 +01:00
11e5866f31 added some defines
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-15 16:24:46 +01:00
9b8092fb09 this seems to work
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-15 16:24:01 +01:00
f546df50a1 Merge branch 'feature_boot_sequence_eive_sys' into thermal_controller
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-15 16:21:14 +01:00
8201a4140a works better now
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-15 16:19:37 +01:00
364342855d maybe force a mode command?
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-15 15:52:20 +01:00
c688a51838 Merge remote-tracking branch 'origin/feature_boot_sequence_eive_sys' into thermal_controller 2023-03-15 15:52:14 +01:00
715a69db89 this should cover upper bound checking when heater is off
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-15 15:43:20 +01:00
dc44af5b29 copy and paste error
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-15 15:20:47 +01:00
27f29eda40 small error
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-15 15:16:12 +01:00
50a62b9243 sth broke..
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-15 15:13:53 +01:00
da7c450e06 most temps should be valid now
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-15 15:00:06 +01:00
a92fa31cb5 better variable names, tweaks for less init events
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-15 14:56:26 +01:00
d273621419 some tweaks
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-15 14:36:18 +01:00
64ec76bfb7 Merge branch 'develop' into thermal_controller
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-15 14:14:56 +01:00
69525b6fd1 bump fsfw
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2023-03-15 14:10:53 +01:00
c1d8eda2c7 Merge remote-tracking branch 'origin/develop' into thermal_controller 2023-03-15 14:10:36 +01:00
8b11302028 unittest works again
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-14 20:35:49 +01:00
c1b4a1c164 Merge branch 'thermal_controller' of https://egit.irs.uni-stuttgart.de/eive/eive-obsw into thermal_controller
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2023-03-14 20:04:03 +01:00
58212d7081 Merge remote-tracking branch 'origin/develop' into thermal_controller 2023-03-14 20:04:00 +01:00
a6e6ee053d Merge branch 'develop' into thermal_controller
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2023-03-14 20:03:29 +01:00
e82777479b Merge remote-tracking branch 'origin/develop' into thermal_controller
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2023-03-14 18:50:28 +01:00
a51a680396 Merge remote-tracking branch 'origin/develop' into thermal_controller
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2023-03-14 15:34:25 +01:00
d3bf70243b Merge remote-tracking branch 'origin/develop' into thermal_controller
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2023-03-14 14:25:35 +01:00
4392598a67 Merge remote-tracking branch 'origin/develop' into thermal_controller
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2023-03-14 14:16:59 +01:00
26a9dce0a0 basic implementation for passive cooling
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2023-03-13 17:36:41 +01:00
9d1d62aee0 bump fsfw
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2023-03-13 16:02:24 +01:00
bf2d97bd60 continue thermal controller overheating
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2023-03-13 15:59:19 +01:00
721a01409e Merge branch 'thermal_controller' of https://egit.irs.uni-stuttgart.de/eive/eive-obsw into thermal_controller
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2023-03-13 13:28:02 +01:00
a0d6552781 . 2023-03-13 13:27:36 +01:00
c709b2a526 Merge branch 'develop' into thermal_controller
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-13 13:01:31 +01:00
5793d73ff6 printouts
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-13 12:53:40 +01:00
c63b13fc40 overheating
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-09 16:53:48 +01:00
224a3af6f8 Merge remote-tracking branch 'origin/develop' into thermal_controller 2023-03-09 16:09:01 +01:00
131c508cae position heaterTransitionControl()
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-09 09:37:10 +01:00
7a62624687 changes
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-08 15:56:05 +01:00
337717d271 Merge branch 'thermal_controller' of https://egit.irs.uni-stuttgart.de/eive/eive-obsw into thermal_controller
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-08 14:35:04 +01:00
9c77703ada Merge branch 'develop' into thermal_controller
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-03-05 16:19:59 +01:00
718d067b40 small 2023-03-05 13:27:42 +01:00
37b540fd48 switch
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
Transition
2023-03-05 13:05:32 +01:00
88db78fed9 Merge remote-tracking branch 'origin/develop' into thermal_controller
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-02-28 19:17:45 +01:00
5f3bd5c754 Merge branch 'thermal_controller' of https://egit.irs.uni-stuttgart.de/eive/eive-obsw into thermal_controller
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-02-24 13:46:14 +01:00
63275df3f0 formal changes 2023-02-24 13:39:23 +01:00
d6f537da5f Merge remote-tracking branch 'origin/develop' into thermal_controller
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-02-23 15:58:10 +01:00
9a7779cffb struct heaterStates and more
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2023-02-22 21:46:56 +01:00
0fa1bab94d comments
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-02-22 19:14:35 +01:00
29179bde0c merge conflicts
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-02-22 18:01:54 +01:00
b9a6425078 dummy change
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-02-22 17:50:03 +01:00
e13636167f limit for error events thermalcontroller + dummy beta
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-02-22 17:30:30 +01:00
9b849d10e9 small changes
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-02-21 17:49:55 +01:00
77b7433caf enum ThermalComponents
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-02-10 12:18:16 +01:00
81 changed files with 1691 additions and 894 deletions

1
.idea/cmake.xml generated
View File

@ -2,7 +2,6 @@
<project version="4">
<component name="CMakeSharedSettings">
<configurations>
<configuration PROFILE_NAME="Debug" ENABLED="true" CONFIG_NAME="Debug" NO_GENERATOR="true" />
<configuration PROFILE_NAME="Debug Q7S" ENABLED="true" CONFIG_NAME="Debug" TOOLCHAIN_NAME="Q7S" GENERATION_OPTIONS="-DTGT_BSP=&quot;arm/q7s&quot;" NO_GENERATOR="true">
<ADDITIONAL_GENERATION_ENVIRONMENT>
<envs>

View File

@ -16,10 +16,38 @@ will consitute of a breaking change warranting a new major release:
# [unreleased]
# [v1.43.0] 2023-04-04
- q7s-package: v2.4.0
- eive-tmtc: v2.21.0
## Added
- Version of thermal controller which performs basic control tasks.
- PCDU handler can now command switch of the 3V3 stack (switch ID 19)
- Set STR dev to OFF in assembly when it is faulty.
- STR: Reset data link layer and flush RX for regular commands and before performing special
commands to ensure consistent start state
## Fixed
- PTME was not reset after configuration changes.
- GPS health devices: ACS board assembly not reacts to health changes.
- STR COM helper: Reset reply size after returning a reply
## Changed
- Poll threshold configuration of the PTME IP core is now configurable via a parameter command
and is set to 0b010 (4 polls) instead of 0b001 (1 poll) per default.
- EIVE system fallback and COM system fallback: Perform general subsystem handling first, then
event reception, and finally any new transition handling.
- IMTQ MGM integration time lowered to 6 ms. This relaxes scheduling requirements a bit.
- PCDU handler switcher HK set now has additional 3V3 switcher state HK.
# [v1.42.0] 2023-04-01
eive-tmtc: v2.20.1
q7s-package: v2.3.0
- eive-tmtc: v2.20.1
- q7s-package: v2.3.0
## Changed
@ -51,8 +79,8 @@ q7s-package: v2.3.0
# [v1.41.0] 2023-03-28
eive-tmtc: v2.20.0
q7s-package: v2.2.0
- eive-tmtc: v2.20.0
- q7s-package: v2.2.0
## Fixed

View File

@ -10,7 +10,7 @@
cmake_minimum_required(VERSION 3.13)
set(OBSW_VERSION_MAJOR 1)
set(OBSW_VERSION_MINOR 42)
set(OBSW_VERSION_MINOR 43)
set(OBSW_VERSION_REVISION 0)
# set(CMAKE_VERBOSE TRUE)
@ -113,7 +113,7 @@ set(OBSW_ADD_TCS_CTRL
1
CACHE STRING "Add TCS controllers")
set(OBSW_ADD_HEATERS
${INIT_VAL}
1
CACHE STRING "Add TCS heaters")
set(OBSW_ADD_PLOC_SUPERVISOR
${INIT_VAL}

View File

@ -11,6 +11,7 @@
#include "../mission/utility/DummySdCardManager.h"
#include "OBSWConfig.h"
#include "fsfw/platform.h"
#include "fsfw/power/PowerSwitchIF.h"
#include "fsfw_tests/integration/task/TestTask.h"
#if OBSW_ADD_TMTC_UDP_SERVER == 1
@ -67,6 +68,12 @@ void ObjectFactory::produce(void* args) {
auto* dummyGpioIF = new DummyGpioIF();
auto* dummySwitcher = new DummyPowerSwitcher(objects::PCDU_HANDLER, 18, 0);
std::vector<ReturnValue_t> switcherList;
auto initVal = PowerSwitchIF::SWITCH_OFF;
for (unsigned i = 0; i < 18; i++) {
switcherList.emplace_back(initVal);
}
dummySwitcher->setInitialSwitcherList(switcherList);
#ifdef PLATFORM_UNIX
new SerialComIF(objects::UART_COM_IF);
#if OBSW_ADD_PLOC_MPSOC == 1

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 284 translations.
* @details
* Generated on: 2023-04-01 15:26:43
* Generated on: 2023-04-04 13:59:07
*/
#include "translateEvents.h"
@ -209,13 +209,11 @@ const char *TRANSITION_OTHER_SIDE_FAILED_STRING = "TRANSITION_OTHER_SIDE_FAILED"
const char *NOT_ENOUGH_DEVICES_DUAL_MODE_STRING = "NOT_ENOUGH_DEVICES_DUAL_MODE";
const char *POWER_STATE_MACHINE_TIMEOUT_STRING = "POWER_STATE_MACHINE_TIMEOUT";
const char *SIDE_SWITCH_TRANSITION_NOT_ALLOWED_STRING = "SIDE_SWITCH_TRANSITION_NOT_ALLOWED";
const char *DIRECT_TRANSITION_TO_DUAL_OTHER_GPS_FAULTY_STRING =
"DIRECT_TRANSITION_TO_DUAL_OTHER_GPS_FAULTY";
const char *DIRECT_TRANSITION_TO_DUAL_OTHER_GPS_FAULTY_STRING = "DIRECT_TRANSITION_TO_DUAL_OTHER_GPS_FAULTY";
const char *TRANSITION_OTHER_SIDE_FAILED_12900_STRING = "TRANSITION_OTHER_SIDE_FAILED_12900";
const char *NOT_ENOUGH_DEVICES_DUAL_MODE_12901_STRING = "NOT_ENOUGH_DEVICES_DUAL_MODE_12901";
const char *POWER_STATE_MACHINE_TIMEOUT_12902_STRING = "POWER_STATE_MACHINE_TIMEOUT_12902";
const char *SIDE_SWITCH_TRANSITION_NOT_ALLOWED_12903_STRING =
"SIDE_SWITCH_TRANSITION_NOT_ALLOWED_12903";
const char *SIDE_SWITCH_TRANSITION_NOT_ALLOWED_12903_STRING = "SIDE_SWITCH_TRANSITION_NOT_ALLOWED_12903";
const char *CHILDREN_LOST_MODE_STRING = "CHILDREN_LOST_MODE";
const char *GPS_FIX_CHANGE_STRING = "GPS_FIX_CHANGE";
const char *CANT_GET_FIX_STRING = "CANT_GET_FIX";
@ -272,10 +270,10 @@ const char *I2C_UNAVAILABLE_REBOOT_STRING = "I2C_UNAVAILABLE_REBOOT";
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
const char *PLOC_OVERHEATING_STRING = "PLOC_OVERHEATING";
const char *OBC_OVERHEATING_STRING = "OBC_OVERHEATING";
const char *HPA_OVERHEATING_STRING = "HPA_OVERHEATING";
const char *PLPCDU_OVERHEATING_STRING = "PLPCDU_OVERHEATING";
const char *CAMERA_OVERHEATING_STRING = "CAMERA_OVERHEATING";
const char *PCDU_SYSTEM_OVERHEATING_STRING = "PCDU_SYSTEM_OVERHEATING";
const char *HEATER_NOT_OFF_FOR_OFF_MODE_STRING = "HEATER_NOT_OFF_FOR_OFF_MODE";
const char *TX_TIMER_EXPIRED_STRING = "TX_TIMER_EXPIRED";
const char *BIT_LOCK_TX_ON_STRING = "BIT_LOCK_TX_ON";
const char *POSSIBLE_FILE_CORRUPTION_STRING = "POSSIBLE_FILE_CORRUPTION";
@ -824,14 +822,14 @@ const char *translateEvents(Event event) {
return NO_HEALTHY_HEATER_AVAILABLE_STRING;
case (14102):
return SYRLINKS_OVERHEATING_STRING;
case (14103):
return PLOC_OVERHEATING_STRING;
case (14104):
return OBC_OVERHEATING_STRING;
case (14105):
return HPA_OVERHEATING_STRING;
return CAMERA_OVERHEATING_STRING;
case (14106):
return PLPCDU_OVERHEATING_STRING;
return PCDU_SYSTEM_OVERHEATING_STRING;
case (14107):
return HEATER_NOT_OFF_FOR_OFF_MODE_STRING;
case (14201):
return TX_TIMER_EXPIRED_STRING;
case (14202):

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file.
* @details
* Contains 171 translations.
* Generated on: 2023-04-01 15:26:43
* Generated on: 2023-04-04 13:59:07
*/
#include "translateObjects.h"

View File

@ -156,6 +156,10 @@ void scheduling::initTasks() {
if (result != returnvalue::OK) {
scheduling::printAddObjectError("THERMAL_CONTROLLER", objects::THERMAL_CONTROLLER);
}
result = thermalTask->addComponent(objects::HEATER_HANDLER);
if (result != returnvalue::OK) {
scheduling::printAddObjectError("HEATER_HANDLER", objects::HEATER_HANDLER);
}
FixedTimeslotTaskIF* pstTask = factory->createFixedTimeslotTask(
"DUMMY_PST", 75, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc);
@ -193,7 +197,8 @@ void scheduling::initTasks() {
#endif /* OBSW_ADD_TEST_CODE == 1 */
PeriodicTaskIF* dummyTask = factory->createPeriodicTask(
"DUMMY_TASK", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
"DUMMY_TASK", 35, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
dummyTask->addComponent(objects::THERMAL_TEMP_INSERTER);
scheduling::scheduleTmpTempSensors(dummyTask);
scheduling::scheduleRtdSensors(dummyTask);
dummyTask->addComponent(objects::SUS_0_N_LOC_XFYFZM_PT_XF);

View File

@ -518,8 +518,6 @@ void ObjectFactory::createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF*
new GpsHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT, debugGps);
gpsCtrl->setResetPinTriggerFunction(gps::triggerGpioResetPin, &RESET_ARGS_GNSS);
new HealthDevice(objects::GPS_0_HEALTH_DEV, objects::ACS_BOARD_ASS);
new HealthDevice(objects::GPS_1_HEALTH_DEV, objects::ACS_BOARD_ASS);
ObjectFactory::createAcsBoardAssy(pwrSwitcher, assemblyChildren, gpsCtrl, gpioComIF);
#endif /* OBSW_ADD_ACS_HANDLERS == 1 */
}
@ -592,7 +590,7 @@ void ObjectFactory::createSolarArrayDeploymentComponents(PowerSwitchIF& pwrSwitc
}
new SolarArrayDeploymentHandler(objects::SOLAR_ARRAY_DEPL_HANDLER, gpioIF, pwrSwitcher,
pcdu::Switches::PDU2_CH5_DEPLOYMENT_MECHANISM_8V,
power::Switches::PDU2_CH5_DEPLOYMENT_MECHANISM_8V,
gpioIds::DEPLSA1, gpioIds::DEPLSA2, *SdCardManager::instance());
}
@ -608,7 +606,7 @@ void ObjectFactory::createSyrlinksComponents(PowerSwitchIF* pwrSwitcher) {
auto syrlinksFdir = new SyrlinksFdir(objects::SYRLINKS_HANDLER);
auto syrlinksHandler =
new SyrlinksHandler(objects::SYRLINKS_HANDLER, objects::SYRLINKS_COM_HANDLER,
syrlinksUartCookie, pcdu::PDU1_CH1_SYRLINKS_12V, syrlinksFdir);
syrlinksUartCookie, power::PDU1_CH1_SYRLINKS_12V, syrlinksFdir);
syrlinksHandler->setPowerSwitcher(pwrSwitcher);
syrlinksHandler->connectModeTreeParent(*syrlinksAssy);
#if OBSW_DEBUG_SYRLINKS == 1
@ -620,7 +618,7 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF, PowerSwit
using namespace gpio;
std::stringstream consumer;
auto* camSwitcher =
new CamSwitcher(objects::CAM_SWITCHER, pwrSwitch, pcdu::PDU2_CH8_PAYLOAD_CAMERA);
new CamSwitcher(objects::CAM_SWITCHER, pwrSwitch, power::PDU2_CH8_PAYLOAD_CAMERA);
camSwitcher->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
#if OBSW_ADD_PLOC_MPSOC == 1
consumer << "0x" << std::hex << objects::PLOC_MPSOC_HANDLER;
@ -653,7 +651,7 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF, PowerSwit
auto supvHelper = new PlocSupvUartManager(objects::PLOC_SUPERVISOR_HELPER);
auto* supvHandler = new PlocSupervisorHandler(objects::PLOC_SUPERVISOR_HANDLER, supervisorCookie,
Gpio(gpioIds::ENABLE_SUPV_UART, gpioComIF),
pcdu::PDU1_CH6_PLOC_12V, *supvHelper);
power::PDU1_CH6_PLOC_12V, *supvHelper);
supvHandler->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
static_cast<void>(consumer);
@ -730,7 +728,7 @@ void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF,
rws[idx] = rwHandler;
}
createRwAssy(*pwrSwitcher, pcdu::Switches::PDU2_CH2_RW_5V, rws, rwIds);
createRwAssy(*pwrSwitcher, power::Switches::PDU2_CH2_RW_5V, rws, rwIds);
#endif /* OBSW_ADD_RW == 1 */
}
@ -968,7 +966,7 @@ void ObjectFactory::createStrComponents(PowerSwitchIF* pwrSwitcher) {
auto strFdir = new StrFdir(objects::STAR_TRACKER);
auto starTracker =
new StarTrackerHandler(objects::STAR_TRACKER, objects::STR_COM_IF, starTrackerCookie,
paramJsonFile, strComIF, pcdu::PDU1_CH2_STAR_TRACKER_5V);
paramJsonFile, strComIF, power::PDU1_CH2_STAR_TRACKER_5V);
starTracker->setPowerSwitcher(pwrSwitcher);
starTracker->connectModeTreeParent(*strAssy);
starTracker->setCustomFdir(strFdir);
@ -981,7 +979,7 @@ void ObjectFactory::createImtqComponents(PowerSwitchIF* pwrSwitcher, bool enable
new ImtqPollingTask(objects::IMTQ_POLLING, I2C_FATAL_ERRORS);
I2cCookie* imtqI2cCookie = new I2cCookie(addresses::IMTQ, imtq::MAX_REPLY_SIZE, q7s::I2C_PL_EIVE);
auto imtqHandler = new ImtqHandler(objects::IMTQ_HANDLER, objects::IMTQ_POLLING, imtqI2cCookie,
pcdu::Switches::PDU1_CH3_MGT_5V, enableHkSets);
power::Switches::PDU1_CH3_MGT_5V, enableHkSets);
imtqHandler->enableThermalModule(ThermalStateCfg());
imtqHandler->setPowerSwitcher(pwrSwitcher);
imtqHandler->connectModeTreeParent(*imtqAssy);

View File

@ -137,8 +137,8 @@ void ObjectFactory::produce(void* args) {
pcdu::Switches::PDU1_CH5_SOLAR_CELL_EXP_5V);
#endif
createAcsController(true, enableHkSets);
HeaterHandler* heaterHandler = nullptr;
ObjectFactory::createGenericHeaterComponents(*gpioComIF, *pwrSwitcher, heaterHandler);
HeaterHandler* heaterHandler;
createHeaterComponents(gpioComIF, pwrSwitcher, healthTable, heaterHandler);
createThermalController(*heaterHandler);
satsystem::init();
}

View File

@ -97,7 +97,7 @@ void ObjectFactory::produce(void* args) {
#if OBSW_ADD_SCEX_DEVICE == 1
createScexComponents(q7s::UART_SCEX_DEV, pwrSwitcher, *SdCardManager::instance(), false,
pcdu::Switches::PDU1_CH5_SOLAR_CELL_EXP_5V);
power::Switches::PDU1_CH5_SOLAR_CELL_EXP_5V);
#endif
/* Test Task */
#if OBSW_ADD_TEST_CODE == 1

View File

@ -46,7 +46,7 @@ ReturnValue_t GyroAdisDummy::initializeLocalDataPool(localpool::DataPool &localD
localDataPoolMap.emplace(adis1650x::ACCELERATION_X, new PoolEntry<double>({0.0}));
localDataPoolMap.emplace(adis1650x::ACCELERATION_Y, new PoolEntry<double>({0.0}));
localDataPoolMap.emplace(adis1650x::ACCELERATION_Z, new PoolEntry<double>({0.0}));
localDataPoolMap.emplace(adis1650x::TEMPERATURE, new PoolEntry<float>({0.0}));
localDataPoolMap.emplace(adis1650x::TEMPERATURE, new PoolEntry<float>({10.0}, true));
return returnvalue::OK;
}

View File

@ -1,5 +1,7 @@
#include "Max31865Dummy.h"
#include "fsfw/datapool/PoolReadGuard.h"
using namespace returnvalue;
Max31865Dummy::Max31865Dummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
@ -28,15 +30,20 @@ ReturnValue_t Max31865Dummy::initializeLocalDataPool(localpool::DataPool &localD
LocalDataPoolManager &poolManager) {
using namespace MAX31865;
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::RTD_VALUE), new PoolEntry<float>({0}));
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::TEMPERATURE_C), new PoolEntry<float>({0}));
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::TEMPERATURE_C),
new PoolEntry<float>({10.0}, true));
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::LAST_FAULT_BYTE),
new PoolEntry<uint8_t>({0}));
localDataPoolMap.emplace(static_cast<lp_id_t>(PoolIds::FAULT_BYTE), new PoolEntry<uint8_t>({0}));
return OK;
}
void Max31865Dummy::setTemperature(float temperature) {
set.temperatureCelcius.value = temperature;
void Max31865Dummy::setTemperature(float temperature, bool valid) {
PoolReadGuard pg(&set);
if (pg.getReadResult() == returnvalue::OK) {
set.temperatureCelcius.value = temperature;
set.setValidity(valid, true);
}
}
LocalPoolDataSetBase *Max31865Dummy::getDataSetHandle(sid_t sid) { return &set; }

View File

@ -10,7 +10,7 @@ class Max31865Dummy : public DeviceHandlerBase {
Max31865Dummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie);
Max31865Dummy(object_id_t objectId, CookieIF *comCookie);
void setTemperature(float temperature);
void setTemperature(float temperature, bool setValid);
private:
MAX31865::PrimarySet set;

View File

@ -40,7 +40,7 @@ uint32_t MgmLIS3MDLDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) {
ReturnValue_t MgmLIS3MDLDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) {
localDataPoolMap.emplace(mgmLis3::TEMPERATURE_CELCIUS, new PoolEntry<float>({0.0}));
localDataPoolMap.emplace(mgmLis3::TEMPERATURE_CELCIUS, new PoolEntry<float>({10.0}, true));
localDataPoolMap.emplace(mgmLis3::FIELD_STRENGTHS,
new PoolEntry<float>({1.02, 0.56, -0.78}, true));
return returnvalue::OK;

View File

@ -2,6 +2,8 @@
#include <mission/power/gsDefs.h>
#include "fsfw/datapool/PoolReadGuard.h"
P60DockDummy::P60DockDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
: DeviceHandlerBase(objectId, comif, comCookie) {}

View File

@ -3,6 +3,8 @@
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
#include "mission/power/gsDefs.h"
class P60DockDummy : public DeviceHandlerBase {
public:
static const DeviceCommandId_t SIMPLE_COMMAND = 1;
@ -15,6 +17,8 @@ class P60DockDummy : public DeviceHandlerBase {
virtual ~P60DockDummy();
protected:
lp_var_t<float> temp1 = lp_var_t<float>(this, P60Dock::pool::P60DOCK_TEMPERATURE_1);
lp_var_t<float> temp2 = lp_var_t<float>(this, P60Dock::pool::P60DOCK_TEMPERATURE_2);
void doStartUp() override;
void doShutDown() override;
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;

View File

@ -2,6 +2,8 @@
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
#include "mission/power/defs.h"
class PlocMpsocDummy : public DeviceHandlerBase {
public:
static const DeviceCommandId_t SIMPLE_COMMAND = 1;

View File

@ -1,8 +1,10 @@
#include "PlocSupervisorDummy.h"
PlocSupervisorDummy::PlocSupervisorDummy(object_id_t objectId, object_id_t comif,
CookieIF *comCookie)
: DeviceHandlerBase(objectId, comif, comCookie) {}
CookieIF *comCookie, PowerSwitchIF &pwrSwitcher)
: DeviceHandlerBase(objectId, comif, comCookie) {
setPowerSwitcher(&pwrSwitcher);
}
PlocSupervisorDummy::~PlocSupervisorDummy() {}
@ -42,3 +44,10 @@ ReturnValue_t PlocSupervisorDummy::initializeLocalDataPool(localpool::DataPool &
LocalDataPoolManager &poolManager) {
return returnvalue::OK;
}
ReturnValue_t PlocSupervisorDummy::getSwitches(const uint8_t **switches,
uint8_t *numberOfSwitches) {
*numberOfSwitches = 1;
*switches = reinterpret_cast<const uint8_t *>(&switchId);
return returnvalue::OK;
}

View File

@ -1,6 +1,7 @@
#pragma once
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
#include <mission/power/defs.h>
class PlocSupervisorDummy : public DeviceHandlerBase {
public:
@ -10,10 +11,13 @@ class PlocSupervisorDummy : public DeviceHandlerBase {
static const uint8_t SIMPLE_COMMAND_DATA = 1;
static const uint8_t PERIODIC_REPLY_DATA = 2;
PlocSupervisorDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie);
PlocSupervisorDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie,
PowerSwitchIF &pwrSwitcher);
virtual ~PlocSupervisorDummy();
protected:
const power::Switches switchId = power::Switches::PDU1_CH6_PLOC_12V;
void doStartUp() override;
void doShutDown() override;
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
@ -27,4 +31,5 @@ class PlocSupervisorDummy : public DeviceHandlerBase {
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) override;
ReturnValue_t getSwitches(const uint8_t **switches, uint8_t *numberOfSwitches) override;
};

View File

@ -40,7 +40,7 @@ uint32_t StarTrackerDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo)
ReturnValue_t StarTrackerDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) {
localDataPoolMap.emplace(startracker::MCU_TEMPERATURE, new PoolEntry<float>({0}));
localDataPoolMap.emplace(startracker::MCU_TEMPERATURE, new PoolEntry<float>({10.0}, true));
localDataPoolMap.emplace(startracker::TICKS_SOLUTION_SET, new PoolEntry<uint32_t>({0}));
localDataPoolMap.emplace(startracker::TIME_SOLUTION_SET, new PoolEntry<uint64_t>({0}));

View File

@ -40,7 +40,7 @@ uint32_t SyrlinksDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { r
ReturnValue_t SyrlinksDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) {
localDataPoolMap.emplace(syrlinks::TEMP_BASEBAND_BOARD, new PoolEntry<float>({0}));
localDataPoolMap.emplace(syrlinks::TEMP_POWER_AMPLIFIER, new PoolEntry<float>({0}));
localDataPoolMap.emplace(syrlinks::TEMP_BASEBAND_BOARD, new PoolEntry<float>({10}, true));
localDataPoolMap.emplace(syrlinks::TEMP_POWER_AMPLIFIER, new PoolEntry<float>({10}, true));
return returnvalue::OK;
}

View File

@ -9,7 +9,7 @@
TemperatureSensorInserter::TemperatureSensorInserter(object_id_t objectId,
Max31865DummyMap tempSensorDummies_,
Tmp1075DummyMap tempTmpSensorDummies_)
: SystemObject(objects::THERMAL_TEMP_INSERTER),
: SystemObject(objectId),
max31865DummyMap(std::move(tempSensorDummies_)),
tmp1075DummyMap(std::move(tempTmpSensorDummies_)) {}
@ -22,6 +22,32 @@ ReturnValue_t TemperatureSensorInserter::initialize() {
}
ReturnValue_t TemperatureSensorInserter::performOperation(uint8_t opCode) {
// TODO: deviceSensors
if (not tempsWereInitialized) {
for (auto& rtdDummy : max31865DummyMap) {
rtdDummy.second->setTemperature(10, true);
}
for (auto& tmpDummy : tmp1075DummyMap) {
tmpDummy.second->setTemperature(10, true);
}
tempsWereInitialized = true;
}
if (cycles == 10) {
max31865DummyMap[objects::RTD_9_IC12_HPA]->setTemperature(-100, true);
max31865DummyMap[objects::RTD_11_IC14_MPA]->setTemperature(-100, true);
}
if (cycles == 35) {
max31865DummyMap[objects::RTD_9_IC12_HPA]->setTemperature(0, true);
max31865DummyMap[objects::RTD_11_IC14_MPA]->setTemperature(0, true);
max31865DummyMap[objects::RTD_2_IC5_4K_CAMERA]->setTemperature(-100, true);
}
if (cycles == 60) {
max31865DummyMap[objects::RTD_9_IC12_HPA]->setTemperature(-100, true);
max31865DummyMap[objects::RTD_11_IC14_MPA]->setTemperature(0, true);
}
/*
ReturnValue_t result = max31865PlocHeatspreaderSet.read();
if (result != returnvalue::OK) {
@ -36,5 +62,7 @@ ReturnValue_t TemperatureSensorInserter::performOperation(uint8_t opCode) {
}
max31865PlocHeatspreaderSet.commit();
*/
cycles++;
return returnvalue::OK;
}
ReturnValue_t TemperatureSensorInserter::initializeAfterTaskCreation() { return returnvalue::OK; }

View File

@ -14,6 +14,7 @@ class TemperatureSensorInserter : public ExecutableObjectIF, public SystemObject
Tmp1075DummyMap tempTmpSensorDummies_);
ReturnValue_t initialize() override;
ReturnValue_t initializeAfterTaskCreation() override;
protected:
ReturnValue_t performOperation(uint8_t opCode) override;
@ -23,6 +24,8 @@ class TemperatureSensorInserter : public ExecutableObjectIF, public SystemObject
Tmp1075DummyMap tmp1075DummyMap;
enum TestCase { NONE = 0, COOL_SYRLINKS = 1 };
int iteration = 0;
uint32_t cycles = 0;
bool tempsWereInitialized = false;
bool performTest = false;
TestCase testCase = TestCase::NONE;

View File

@ -1,5 +1,6 @@
#include "Tmp1075Dummy.h"
#include <fsfw/datapool/PoolReadGuard.h>
#include <mission/tcs/Tmp1075Definitions.h>
using namespace returnvalue;
@ -26,11 +27,16 @@ ReturnValue_t Tmp1075Dummy::scanForReply(const uint8_t *start, size_t len,
ReturnValue_t Tmp1075Dummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
return 0;
}
void Tmp1075Dummy::setTemperature(float temperature, bool valid) {
PoolReadGuard pg(&set);
set.temperatureCelcius.value = temperature;
set.setValidity(valid, true);
}
void Tmp1075Dummy::fillCommandAndReplyMap() {}
uint32_t Tmp1075Dummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 1000; }
ReturnValue_t Tmp1075Dummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) {
localDataPoolMap.emplace(TMP1075::TEMPERATURE_C_TMP1075, new PoolEntry<float>({0.0}));
localDataPoolMap.emplace(TMP1075::TEMPERATURE_C_TMP1075, new PoolEntry<float>({10.0}, true));
return OK;
}
LocalPoolDataSetBase *Tmp1075Dummy::getDataSetHandle(sid_t sid) { return &set; }

View File

@ -8,6 +8,7 @@
class Tmp1075Dummy : public DeviceHandlerBase {
public:
Tmp1075Dummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie);
void setTemperature(float temperature, bool setValid);
private:
TMP1075::Tmp1075Dataset set;

View File

@ -57,7 +57,7 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio
rws[1] = new RwDummy(objects::RW2, objects::DUMMY_COM_IF, comCookieDummy);
rws[2] = new RwDummy(objects::RW3, objects::DUMMY_COM_IF, comCookieDummy);
rws[3] = new RwDummy(objects::RW4, objects::DUMMY_COM_IF, comCookieDummy);
ObjectFactory::createRwAssy(pwrSwitcher, pcdu::Switches::PDU2_CH2_RW_5V, rws, rwIds);
ObjectFactory::createRwAssy(pwrSwitcher, power::Switches::PDU2_CH2_RW_5V, rws, rwIds);
new SaDeplDummy(objects::SOLAR_ARRAY_DEPL_HANDLER);
auto* strAssy = new StrAssembly(objects::STR_ASSY);
strAssy->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM);
@ -99,8 +99,6 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio
new GyroAdisDummy(objects::GYRO_2_ADIS_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
assemblyDhbs[7] =
new GyroL3GD20Dummy(objects::GYRO_3_L3G_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
new HealthDevice(objects::GPS_0_HEALTH_DEV, objects::ACS_BOARD_ASS);
new HealthDevice(objects::GPS_1_HEALTH_DEV, objects::ACS_BOARD_ASS);
auto* gpsCtrl = new GpsCtrlDummy(objects::GPS_CONTROLLER);
ObjectFactory::createAcsBoardAssy(pwrSwitcher, assemblyDhbs, gpsCtrl, gpioIF);
}
@ -213,7 +211,7 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio
}
}
auto* camSwitcher =
new CamSwitcher(objects::CAM_SWITCHER, pwrSwitcher, pcdu::Switches::PDU2_CH8_PAYLOAD_CAMERA);
new CamSwitcher(objects::CAM_SWITCHER, pwrSwitcher, power::Switches::PDU2_CH8_PAYLOAD_CAMERA);
camSwitcher->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
auto* scexDummy = new ScexDummy(objects::SCEX, objects::DUMMY_COM_IF, comCookieDummy);
scexDummy->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
@ -224,8 +222,8 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio
auto* plocMpsocDummy =
new PlocMpsocDummy(objects::PLOC_MPSOC_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
plocMpsocDummy->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
auto* plocSupervisorDummy = new PlocSupervisorDummy(objects::PLOC_SUPERVISOR_HANDLER,
objects::DUMMY_COM_IF, comCookieDummy);
auto* plocSupervisorDummy = new PlocSupervisorDummy(
objects::PLOC_SUPERVISOR_HANDLER, objects::DUMMY_COM_IF, comCookieDummy, pwrSwitcher);
plocSupervisorDummy->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
}
}

2
fsfw

Submodule fsfw updated: 4f632e2c68...9fca7581dd

View File

@ -261,13 +261,13 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
14007;0x36b7;REBOOT_COUNTER;INFO;Total reboot counter, which is the sum of the boot count of all individual images.;bsp_q7s/core/CoreController.h
14008;0x36b8;INDIVIDUAL_BOOT_COUNTS;INFO;Get the boot count of the individual images. P1: First 16 bits boot count of image 0 0, last 16 bits boot count of image 0 1. P2: First 16 bits boot count of image 1 0, last 16 bits boot count of image 1 1.;bsp_q7s/core/CoreController.h
14010;0x36ba;I2C_UNAVAILABLE_REBOOT;MEDIUM;No description;bsp_q7s/core/CoreController.h
14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/ThermalController.h
14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/ThermalController.h
14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
14103;0x3717;PLOC_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
14104;0x3718;OBC_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
14105;0x3719;HPA_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
14106;0x371a;PLPCDU_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/tcsDefs.h
14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/tcsDefs.h
14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
14104;0x3718;OBC_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
14105;0x3719;CAMERA_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
14106;0x371a;PCDU_SYSTEM_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
14107;0x371b;HEATER_NOT_OFF_FOR_OFF_MODE;MEDIUM;No description;mission/controller/tcsDefs.h
14201;0x3779;TX_TIMER_EXPIRED;INFO;The transmit timer to protect the Syrlinks expired P1: The current timer value;mission/system/com/ComSubsystem.h
14202;0x377a;BIT_LOCK_TX_ON;INFO;Transmitter will be turned on due to detection of bitlock;mission/system/com/ComSubsystem.h
14300;0x37dc;POSSIBLE_FILE_CORRUPTION;LOW;P1: Result code of TM packet parser. P2: Timestamp of possibly corrupt file as a unix timestamp.;mission/persistentTmStoreDefs.h

1 Event ID (dec) Event ID (hex) Name Severity Description File Path
261 14007 0x36b7 REBOOT_COUNTER INFO Total reboot counter, which is the sum of the boot count of all individual images. bsp_q7s/core/CoreController.h
262 14008 0x36b8 INDIVIDUAL_BOOT_COUNTS INFO Get the boot count of the individual images. P1: First 16 bits boot count of image 0 0, last 16 bits boot count of image 0 1. P2: First 16 bits boot count of image 1 0, last 16 bits boot count of image 1 1. bsp_q7s/core/CoreController.h
263 14010 0x36ba I2C_UNAVAILABLE_REBOOT MEDIUM No description bsp_q7s/core/CoreController.h
264 14100 0x3714 NO_VALID_SENSOR_TEMPERATURE MEDIUM No description mission/controller/ThermalController.h mission/controller/tcsDefs.h
265 14101 0x3715 NO_HEALTHY_HEATER_AVAILABLE MEDIUM No description mission/controller/ThermalController.h mission/controller/tcsDefs.h
266 14102 0x3716 SYRLINKS_OVERHEATING HIGH No description mission/controller/ThermalController.h mission/controller/tcsDefs.h
267 14103 14104 0x3717 0x3718 PLOC_OVERHEATING OBC_OVERHEATING HIGH No description mission/controller/ThermalController.h mission/controller/tcsDefs.h
268 14104 14105 0x3718 0x3719 OBC_OVERHEATING CAMERA_OVERHEATING HIGH No description mission/controller/ThermalController.h mission/controller/tcsDefs.h
269 14105 14106 0x3719 0x371a HPA_OVERHEATING PCDU_SYSTEM_OVERHEATING HIGH No description mission/controller/ThermalController.h mission/controller/tcsDefs.h
270 14106 14107 0x371a 0x371b PLPCDU_OVERHEATING HEATER_NOT_OFF_FOR_OFF_MODE HIGH MEDIUM No description mission/controller/ThermalController.h mission/controller/tcsDefs.h
271 14201 0x3779 TX_TIMER_EXPIRED INFO The transmit timer to protect the Syrlinks expired P1: The current timer value mission/system/com/ComSubsystem.h
272 14202 0x377a BIT_LOCK_TX_ON INFO Transmitter will be turned on due to detection of bitlock mission/system/com/ComSubsystem.h
273 14300 0x37dc POSSIBLE_FILE_CORRUPTION LOW P1: Result code of TM packet parser. P2: Timestamp of possibly corrupt file as a unix timestamp. mission/persistentTmStoreDefs.h

View File

@ -190,8 +190,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
0x2207;TMF_AllDeleted;No description;7;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
0x2208;TMF_InvalidData;No description;8;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
0x2209;TMF_NotReady;No description;9;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
0x2401;MT_NoPacketFound;No description;1;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/DleParser.h
0x2402;MT_PossiblePacketLoss;No description;2;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/DleParser.h
0x2401;MT_TooDetailedRequest;No description;1;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
0x2402;MT_TooGeneralRequest;No description;2;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
0x2403;MT_NoMatch;No description;3;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
0x2404;MT_Full;No description;4;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
0x2405;MT_NewNodeCreated;No description;5;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
@ -371,8 +371,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
0x3e03;HKM_PeriodicHelperInvalid;No description;3;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
0x3e04;HKM_PoolobjectNotFound;No description;4;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
0x3e05;HKM_DatasetNotFound;No description;5;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
0x3f01;DLEE_StreamTooShort;No description;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
0x3f02;DLEE_DecodingError;No description;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
0x3f01;DLEE_NoPacketFound;No description;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleParser.h
0x3f02;DLEE_PossiblePacketLoss;No description;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleParser.h
0x4201;PUS11_InvalidTypeTimeWindow;No description;1;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
0x4202;PUS11_InvalidTimeWindow;No description;2;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
0x4203;PUS11_TimeshiftingNotPossible;No description;3;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
@ -402,9 +402,9 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
0x4403;UXOS_CommandError;Command execution failed;3;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
0x4404;UXOS_NoCommandLoadedOrPending;;4;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
0x4406;UXOS_PcloseCallError;No description;6;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
0x4500;HSPI_HalTimeoutRetval;No description;0;HAL_SPI;fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
0x4501;HSPI_HalBusyRetval;No description;1;HAL_SPI;fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
0x4502;HSPI_HalErrorRetval;No description;2;HAL_SPI;fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
0x4500;HSPI_OpeningFileFailed;No description;0;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
0x4501;HSPI_FullDuplexTransferFailed;No description;1;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
0x4502;HSPI_HalfDuplexTransferFailed;No description;2;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
0x4601;HURT_UartReadFailure;No description;1;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
0x4602;HURT_UartReadSizeMissmatch;No description;2;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
0x4603;HURT_UartRxBufferTooSmall;No description;3;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
@ -440,7 +440,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
0x5106;IMTQ_InternalProcessingError;No description;6;IMTQ_HANDLER;mission/acs/imtqHelpers.h
0x5107;IMTQ_RejectedWithoutReason;No description;7;IMTQ_HANDLER;mission/acs/imtqHelpers.h
0x5108;IMTQ_CmdErrUnknown;No description;8;IMTQ_HANDLER;mission/acs/imtqHelpers.h
0x51a7;IMTQ_UnexpectedSelfTestReply;The status reply to a self test command was received but no self test command has been sent. This should normally never happen.;167;IMTQ_HANDLER;mission/acs/imtqHelpers.h
0x5109;IMTQ_StartupCfgError;No description;9;IMTQ_HANDLER;mission/acs/imtqHelpers.h
0x510a;IMTQ_UnexpectedSelfTestReply;The status reply to a self test command was received but no self test command has been sent. This should normally never happen.;10;IMTQ_HANDLER;mission/acs/imtqHelpers.h
0x52b0;RWHA_SpiWriteFailure;No description;176;RW_HANDLER;mission/acs/rwHelpers.h
0x52b1;RWHA_SpiReadFailure;Used by the spi send function to tell a failing read call;177;RW_HANDLER;mission/acs/rwHelpers.h
0x52b2;RWHA_MissingStartSign;Can be used by the HDLC decoding mechanism to inform about a missing start sign 0x7E;178;RW_HANDLER;mission/acs/rwHelpers.h

1 Full ID (hex) Name Description Unique ID Subsytem Name File Path
190 0x2207 TMF_AllDeleted No description 7 TM_STORE_FRONTEND_IF fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
191 0x2208 TMF_InvalidData No description 8 TM_STORE_FRONTEND_IF fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
192 0x2209 TMF_NotReady No description 9 TM_STORE_FRONTEND_IF fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
193 0x2401 MT_NoPacketFound MT_TooDetailedRequest No description 1 MATCH_TREE_CLASS fsfw/src/fsfw/globalfunctions/DleParser.h fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
194 0x2402 MT_PossiblePacketLoss MT_TooGeneralRequest No description 2 MATCH_TREE_CLASS fsfw/src/fsfw/globalfunctions/DleParser.h fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
195 0x2403 MT_NoMatch No description 3 MATCH_TREE_CLASS fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
196 0x2404 MT_Full No description 4 MATCH_TREE_CLASS fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
197 0x2405 MT_NewNodeCreated No description 5 MATCH_TREE_CLASS fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
371 0x3e03 HKM_PeriodicHelperInvalid No description 3 HOUSEKEEPING_MANAGER fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
372 0x3e04 HKM_PoolobjectNotFound No description 4 HOUSEKEEPING_MANAGER fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
373 0x3e05 HKM_DatasetNotFound No description 5 HOUSEKEEPING_MANAGER fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
374 0x3f01 DLEE_StreamTooShort DLEE_NoPacketFound No description 1 DLE_ENCODER fsfw/src/fsfw/globalfunctions/DleEncoder.h fsfw/src/fsfw/globalfunctions/DleParser.h
375 0x3f02 DLEE_DecodingError DLEE_PossiblePacketLoss No description 2 DLE_ENCODER fsfw/src/fsfw/globalfunctions/DleEncoder.h fsfw/src/fsfw/globalfunctions/DleParser.h
376 0x4201 PUS11_InvalidTypeTimeWindow No description 1 PUS_SERVICE_11 fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
377 0x4202 PUS11_InvalidTimeWindow No description 2 PUS_SERVICE_11 fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
378 0x4203 PUS11_TimeshiftingNotPossible No description 3 PUS_SERVICE_11 fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
402 0x4403 UXOS_CommandError Command execution failed 3 LINUX_OSAL fsfw/src/fsfw_hal/linux/CommandExecutor.h
403 0x4404 UXOS_NoCommandLoadedOrPending 4 LINUX_OSAL fsfw/src/fsfw_hal/linux/CommandExecutor.h
404 0x4406 UXOS_PcloseCallError No description 6 LINUX_OSAL fsfw/src/fsfw_hal/linux/CommandExecutor.h
405 0x4500 HSPI_HalTimeoutRetval HSPI_OpeningFileFailed No description 0 HAL_SPI fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
406 0x4501 HSPI_HalBusyRetval HSPI_FullDuplexTransferFailed No description 1 HAL_SPI fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
407 0x4502 HSPI_HalErrorRetval HSPI_HalfDuplexTransferFailed No description 2 HAL_SPI fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
408 0x4601 HURT_UartReadFailure No description 1 HAL_UART fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
409 0x4602 HURT_UartReadSizeMissmatch No description 2 HAL_UART fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
410 0x4603 HURT_UartRxBufferTooSmall No description 3 HAL_UART fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
440 0x5106 IMTQ_InternalProcessingError No description 6 IMTQ_HANDLER mission/acs/imtqHelpers.h
441 0x5107 IMTQ_RejectedWithoutReason No description 7 IMTQ_HANDLER mission/acs/imtqHelpers.h
442 0x5108 IMTQ_CmdErrUnknown No description 8 IMTQ_HANDLER mission/acs/imtqHelpers.h
443 0x51a7 0x5109 IMTQ_UnexpectedSelfTestReply IMTQ_StartupCfgError The status reply to a self test command was received but no self test command has been sent. This should normally never happen. No description 167 9 IMTQ_HANDLER mission/acs/imtqHelpers.h
444 0x510a IMTQ_UnexpectedSelfTestReply The status reply to a self test command was received but no self test command has been sent. This should normally never happen. 10 IMTQ_HANDLER mission/acs/imtqHelpers.h
445 0x52b0 RWHA_SpiWriteFailure No description 176 RW_HANDLER mission/acs/rwHelpers.h
446 0x52b1 RWHA_SpiReadFailure Used by the spi send function to tell a failing read call 177 RW_HANDLER mission/acs/rwHelpers.h
447 0x52b2 RWHA_MissingStartSign Can be used by the HDLC decoding mechanism to inform about a missing start sign 0x7E 178 RW_HANDLER mission/acs/rwHelpers.h

View File

@ -261,13 +261,13 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
14007;0x36b7;REBOOT_COUNTER;INFO;Total reboot counter, which is the sum of the boot count of all individual images.;bsp_q7s/core/CoreController.h
14008;0x36b8;INDIVIDUAL_BOOT_COUNTS;INFO;Get the boot count of the individual images. P1: First 16 bits boot count of image 0 0, last 16 bits boot count of image 0 1. P2: First 16 bits boot count of image 1 0, last 16 bits boot count of image 1 1.;bsp_q7s/core/CoreController.h
14010;0x36ba;I2C_UNAVAILABLE_REBOOT;MEDIUM;No description;bsp_q7s/core/CoreController.h
14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/ThermalController.h
14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/ThermalController.h
14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
14103;0x3717;PLOC_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
14104;0x3718;OBC_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
14105;0x3719;HPA_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
14106;0x371a;PLPCDU_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/tcsDefs.h
14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/tcsDefs.h
14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
14104;0x3718;OBC_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
14105;0x3719;CAMERA_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
14106;0x371a;PCDU_SYSTEM_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
14107;0x371b;HEATER_NOT_OFF_FOR_OFF_MODE;MEDIUM;No description;mission/controller/tcsDefs.h
14201;0x3779;TX_TIMER_EXPIRED;INFO;The transmit timer to protect the Syrlinks expired P1: The current timer value;mission/system/com/ComSubsystem.h
14202;0x377a;BIT_LOCK_TX_ON;INFO;Transmitter will be turned on due to detection of bitlock;mission/system/com/ComSubsystem.h
14300;0x37dc;POSSIBLE_FILE_CORRUPTION;LOW;P1: Result code of TM packet parser. P2: Timestamp of possibly corrupt file as a unix timestamp.;mission/persistentTmStoreDefs.h

1 Event ID (dec) Event ID (hex) Name Severity Description File Path
261 14007 0x36b7 REBOOT_COUNTER INFO Total reboot counter, which is the sum of the boot count of all individual images. bsp_q7s/core/CoreController.h
262 14008 0x36b8 INDIVIDUAL_BOOT_COUNTS INFO Get the boot count of the individual images. P1: First 16 bits boot count of image 0 0, last 16 bits boot count of image 0 1. P2: First 16 bits boot count of image 1 0, last 16 bits boot count of image 1 1. bsp_q7s/core/CoreController.h
263 14010 0x36ba I2C_UNAVAILABLE_REBOOT MEDIUM No description bsp_q7s/core/CoreController.h
264 14100 0x3714 NO_VALID_SENSOR_TEMPERATURE MEDIUM No description mission/controller/ThermalController.h mission/controller/tcsDefs.h
265 14101 0x3715 NO_HEALTHY_HEATER_AVAILABLE MEDIUM No description mission/controller/ThermalController.h mission/controller/tcsDefs.h
266 14102 0x3716 SYRLINKS_OVERHEATING HIGH No description mission/controller/ThermalController.h mission/controller/tcsDefs.h
267 14103 14104 0x3717 0x3718 PLOC_OVERHEATING OBC_OVERHEATING HIGH No description mission/controller/ThermalController.h mission/controller/tcsDefs.h
268 14104 14105 0x3718 0x3719 OBC_OVERHEATING CAMERA_OVERHEATING HIGH No description mission/controller/ThermalController.h mission/controller/tcsDefs.h
269 14105 14106 0x3719 0x371a HPA_OVERHEATING PCDU_SYSTEM_OVERHEATING HIGH No description mission/controller/ThermalController.h mission/controller/tcsDefs.h
270 14106 14107 0x371a 0x371b PLPCDU_OVERHEATING HEATER_NOT_OFF_FOR_OFF_MODE HIGH MEDIUM No description mission/controller/ThermalController.h mission/controller/tcsDefs.h
271 14201 0x3779 TX_TIMER_EXPIRED INFO The transmit timer to protect the Syrlinks expired P1: The current timer value mission/system/com/ComSubsystem.h
272 14202 0x377a BIT_LOCK_TX_ON INFO Transmitter will be turned on due to detection of bitlock mission/system/com/ComSubsystem.h
273 14300 0x37dc POSSIBLE_FILE_CORRUPTION LOW P1: Result code of TM packet parser. P2: Timestamp of possibly corrupt file as a unix timestamp. mission/persistentTmStoreDefs.h

View File

@ -190,8 +190,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
0x2207;TMF_AllDeleted;No description;7;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
0x2208;TMF_InvalidData;No description;8;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
0x2209;TMF_NotReady;No description;9;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
0x2401;MT_NoPacketFound;No description;1;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/DleParser.h
0x2402;MT_PossiblePacketLoss;No description;2;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/DleParser.h
0x2401;MT_TooDetailedRequest;No description;1;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
0x2402;MT_TooGeneralRequest;No description;2;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
0x2403;MT_NoMatch;No description;3;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
0x2404;MT_Full;No description;4;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
0x2405;MT_NewNodeCreated;No description;5;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
@ -371,8 +371,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
0x3e03;HKM_PeriodicHelperInvalid;No description;3;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
0x3e04;HKM_PoolobjectNotFound;No description;4;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
0x3e05;HKM_DatasetNotFound;No description;5;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
0x3f01;DLEE_StreamTooShort;No description;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
0x3f02;DLEE_DecodingError;No description;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
0x3f01;DLEE_NoPacketFound;No description;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleParser.h
0x3f02;DLEE_PossiblePacketLoss;No description;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleParser.h
0x4201;PUS11_InvalidTypeTimeWindow;No description;1;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
0x4202;PUS11_InvalidTimeWindow;No description;2;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
0x4203;PUS11_TimeshiftingNotPossible;No description;3;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
@ -402,9 +402,9 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
0x4403;UXOS_CommandError;Command execution failed;3;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
0x4404;UXOS_NoCommandLoadedOrPending;;4;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
0x4406;UXOS_PcloseCallError;No description;6;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
0x4500;HSPI_HalTimeoutRetval;No description;0;HAL_SPI;fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
0x4501;HSPI_HalBusyRetval;No description;1;HAL_SPI;fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
0x4502;HSPI_HalErrorRetval;No description;2;HAL_SPI;fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
0x4500;HSPI_OpeningFileFailed;No description;0;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
0x4501;HSPI_FullDuplexTransferFailed;No description;1;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
0x4502;HSPI_HalfDuplexTransferFailed;No description;2;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
0x4601;HURT_UartReadFailure;No description;1;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
0x4602;HURT_UartReadSizeMissmatch;No description;2;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
0x4603;HURT_UartRxBufferTooSmall;No description;3;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
@ -440,7 +440,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
0x5106;IMTQ_InternalProcessingError;No description;6;IMTQ_HANDLER;mission/acs/imtqHelpers.h
0x5107;IMTQ_RejectedWithoutReason;No description;7;IMTQ_HANDLER;mission/acs/imtqHelpers.h
0x5108;IMTQ_CmdErrUnknown;No description;8;IMTQ_HANDLER;mission/acs/imtqHelpers.h
0x51a7;IMTQ_UnexpectedSelfTestReply;The status reply to a self test command was received but no self test command has been sent. This should normally never happen.;167;IMTQ_HANDLER;mission/acs/imtqHelpers.h
0x5109;IMTQ_StartupCfgError;No description;9;IMTQ_HANDLER;mission/acs/imtqHelpers.h
0x510a;IMTQ_UnexpectedSelfTestReply;The status reply to a self test command was received but no self test command has been sent. This should normally never happen.;10;IMTQ_HANDLER;mission/acs/imtqHelpers.h
0x52b0;RWHA_SpiWriteFailure;No description;176;RW_HANDLER;mission/acs/rwHelpers.h
0x52b1;RWHA_SpiReadFailure;Used by the spi send function to tell a failing read call;177;RW_HANDLER;mission/acs/rwHelpers.h
0x52b2;RWHA_MissingStartSign;Can be used by the HDLC decoding mechanism to inform about a missing start sign 0x7E;178;RW_HANDLER;mission/acs/rwHelpers.h
@ -492,9 +493,10 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
0x58a3;SUSS_ExecutionFailed;Command execution failed;163;SUS_HANDLER;mission/acs/RwHandler.h
0x58a4;SUSS_CrcError;Reaction wheel reply has invalid crc;164;SUS_HANDLER;mission/acs/RwHandler.h
0x58a5;SUSS_ValueNotRead;No description;165;SUS_HANDLER;mission/acs/RwHandler.h
0x5900;IPCI_NoReplyAvailable;No description;0;CCSDS_IP_CORE_BRIDGE;linux/acs/ImtqPollingTask.h
0x5901;IPCI_NoPacketFound;No description;1;CCSDS_IP_CORE_BRIDGE;linux/com/SyrlinksComHandler.h
0x59a0;IPCI_PapbBusy;No description;160;CCSDS_IP_CORE_BRIDGE;linux/ipcore/PapbVcInterface.h
0x5aa0;PTME_UnknownVcId;No description;160;PTME;linux/ipcore/Ptme.h
0x5c00;STRHLP_NoReplyAvailable;No description;0;STR_HELPER;linux/acs/ImtqPollingTask.h
0x5c01;STRHLP_SdNotMounted;SD card specified in path string not mounted;1;STR_HELPER;linux/acs/StrComHandler.h
0x5c02;STRHLP_FileNotExists;Specified file does not exist on filesystem;2;STR_HELPER;linux/acs/StrComHandler.h
0x5c03;STRHLP_PathNotExists;Specified path does not exist;3;STR_HELPER;linux/acs/StrComHandler.h
@ -540,13 +542,13 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
0x63a0;NVMB_KeyNotExists;Specified key does not exist in json file;160;NVM_PARAM_BASE;mission/memory/NvmParameterBase.h
0x64a0;FSHLP_SdNotMounted;SD card specified with path string not mounted;160;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h
0x64a1;FSHLP_FileNotExists;Specified file does not exist on filesystem;161;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h
0x6502;PLMPHLP_InvalidCrc;No description;2;PLOC_MPSOC_HELPER;linux/payload/ScexHelper.h
0x65a0;PLMPHLP_FileClosedAccidentally;File accidentally close;160;PLOC_MPSOC_HELPER;linux/payload/PlocMpsocHelper.h
0x66a0;SADPL_CommandNotSupported;No description;160;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h
0x66a1;SADPL_DeploymentAlreadyExecuting;No description;161;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h
0x66a2;SADPL_MainSwitchTimeoutFailure;No description;162;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h
0x66a3;SADPL_SwitchingDeplSa1Failed;No description;163;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h
0x66a4;SADPL_SwitchingDeplSa2Failed;No description;164;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h
0x6702;MPSOCRTVIF_InvalidCrc;No description;2;MPSOC_RETURN_VALUES_IF;linux/payload/ScexHelper.h
0x67a0;MPSOCRTVIF_CrcFailure;Space Packet received from PLOC has invalid CRC;160;MPSOC_RETURN_VALUES_IF;linux/payload/mpsocRetvals.h
0x67a1;MPSOCRTVIF_ReceivedAckFailure;Received ACK failure reply from PLOC;161;MPSOC_RETURN_VALUES_IF;linux/payload/mpsocRetvals.h
0x67a2;MPSOCRTVIF_ReceivedExeFailure;Received execution failure reply from PLOC;162;MPSOC_RETURN_VALUES_IF;linux/payload/mpsocRetvals.h
@ -557,7 +559,6 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
0x67a7;MPSOCRTVIF_MpsocFilenameTooLong;Filename of MPSoC file is to long (max. 256 bytes);167;MPSOC_RETURN_VALUES_IF;linux/payload/mpsocRetvals.h
0x67a8;MPSOCRTVIF_InvalidParameter;Command has invalid parameter;168;MPSOC_RETURN_VALUES_IF;linux/payload/mpsocRetvals.h
0x67a9;MPSOCRTVIF_NameTooLong;Received command has file string with invalid length;169;MPSOC_RETURN_VALUES_IF;linux/payload/mpsocRetvals.h
0x6801;SPVRTVIF_NoPacketFound;No description;1;SUPV_RETURN_VALUES_IF;linux/com/SyrlinksComHandler.h
0x68a0;SPVRTVIF_CrcFailure;Space Packet received from PLOC supervisor has invalid CRC;160;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h
0x68a1;SPVRTVIF_InvalidServiceId;No description;161;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h
0x68a2;SPVRTVIF_ReceivedAckFailure;Received ACK failure reply from PLOC supervisor;162;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h

1 Full ID (hex) Name Description Unique ID Subsytem Name File Path
190 0x2207 TMF_AllDeleted No description 7 TM_STORE_FRONTEND_IF fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
191 0x2208 TMF_InvalidData No description 8 TM_STORE_FRONTEND_IF fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
192 0x2209 TMF_NotReady No description 9 TM_STORE_FRONTEND_IF fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
193 0x2401 MT_NoPacketFound MT_TooDetailedRequest No description 1 MATCH_TREE_CLASS fsfw/src/fsfw/globalfunctions/DleParser.h fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
194 0x2402 MT_PossiblePacketLoss MT_TooGeneralRequest No description 2 MATCH_TREE_CLASS fsfw/src/fsfw/globalfunctions/DleParser.h fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
195 0x2403 MT_NoMatch No description 3 MATCH_TREE_CLASS fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
196 0x2404 MT_Full No description 4 MATCH_TREE_CLASS fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
197 0x2405 MT_NewNodeCreated No description 5 MATCH_TREE_CLASS fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
371 0x3e03 HKM_PeriodicHelperInvalid No description 3 HOUSEKEEPING_MANAGER fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
372 0x3e04 HKM_PoolobjectNotFound No description 4 HOUSEKEEPING_MANAGER fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
373 0x3e05 HKM_DatasetNotFound No description 5 HOUSEKEEPING_MANAGER fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
374 0x3f01 DLEE_StreamTooShort DLEE_NoPacketFound No description 1 DLE_ENCODER fsfw/src/fsfw/globalfunctions/DleEncoder.h fsfw/src/fsfw/globalfunctions/DleParser.h
375 0x3f02 DLEE_DecodingError DLEE_PossiblePacketLoss No description 2 DLE_ENCODER fsfw/src/fsfw/globalfunctions/DleEncoder.h fsfw/src/fsfw/globalfunctions/DleParser.h
376 0x4201 PUS11_InvalidTypeTimeWindow No description 1 PUS_SERVICE_11 fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
377 0x4202 PUS11_InvalidTimeWindow No description 2 PUS_SERVICE_11 fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
378 0x4203 PUS11_TimeshiftingNotPossible No description 3 PUS_SERVICE_11 fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
402 0x4403 UXOS_CommandError Command execution failed 3 LINUX_OSAL fsfw/src/fsfw_hal/linux/CommandExecutor.h
403 0x4404 UXOS_NoCommandLoadedOrPending 4 LINUX_OSAL fsfw/src/fsfw_hal/linux/CommandExecutor.h
404 0x4406 UXOS_PcloseCallError No description 6 LINUX_OSAL fsfw/src/fsfw_hal/linux/CommandExecutor.h
405 0x4500 HSPI_HalTimeoutRetval HSPI_OpeningFileFailed No description 0 HAL_SPI fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
406 0x4501 HSPI_HalBusyRetval HSPI_FullDuplexTransferFailed No description 1 HAL_SPI fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
407 0x4502 HSPI_HalErrorRetval HSPI_HalfDuplexTransferFailed No description 2 HAL_SPI fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
408 0x4601 HURT_UartReadFailure No description 1 HAL_UART fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
409 0x4602 HURT_UartReadSizeMissmatch No description 2 HAL_UART fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
410 0x4603 HURT_UartRxBufferTooSmall No description 3 HAL_UART fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
440 0x5106 IMTQ_InternalProcessingError No description 6 IMTQ_HANDLER mission/acs/imtqHelpers.h
441 0x5107 IMTQ_RejectedWithoutReason No description 7 IMTQ_HANDLER mission/acs/imtqHelpers.h
442 0x5108 IMTQ_CmdErrUnknown No description 8 IMTQ_HANDLER mission/acs/imtqHelpers.h
443 0x51a7 0x5109 IMTQ_UnexpectedSelfTestReply IMTQ_StartupCfgError The status reply to a self test command was received but no self test command has been sent. This should normally never happen. No description 167 9 IMTQ_HANDLER mission/acs/imtqHelpers.h
444 0x510a IMTQ_UnexpectedSelfTestReply The status reply to a self test command was received but no self test command has been sent. This should normally never happen. 10 IMTQ_HANDLER mission/acs/imtqHelpers.h
445 0x52b0 RWHA_SpiWriteFailure No description 176 RW_HANDLER mission/acs/rwHelpers.h
446 0x52b1 RWHA_SpiReadFailure Used by the spi send function to tell a failing read call 177 RW_HANDLER mission/acs/rwHelpers.h
447 0x52b2 RWHA_MissingStartSign Can be used by the HDLC decoding mechanism to inform about a missing start sign 0x7E 178 RW_HANDLER mission/acs/rwHelpers.h
493 0x58a3 SUSS_ExecutionFailed Command execution failed 163 SUS_HANDLER mission/acs/RwHandler.h
494 0x58a4 SUSS_CrcError Reaction wheel reply has invalid crc 164 SUS_HANDLER mission/acs/RwHandler.h
495 0x58a5 SUSS_ValueNotRead No description 165 SUS_HANDLER mission/acs/RwHandler.h
496 0x5900 IPCI_NoReplyAvailable No description 0 CCSDS_IP_CORE_BRIDGE linux/acs/ImtqPollingTask.h
497 0x5901 IPCI_NoPacketFound No description 1 CCSDS_IP_CORE_BRIDGE linux/com/SyrlinksComHandler.h
498 0x59a0 IPCI_PapbBusy No description 160 CCSDS_IP_CORE_BRIDGE linux/ipcore/PapbVcInterface.h
499 0x5aa0 PTME_UnknownVcId No description 160 PTME linux/ipcore/Ptme.h
0x5c00 STRHLP_NoReplyAvailable No description 0 STR_HELPER linux/acs/ImtqPollingTask.h
500 0x5c01 STRHLP_SdNotMounted SD card specified in path string not mounted 1 STR_HELPER linux/acs/StrComHandler.h
501 0x5c02 STRHLP_FileNotExists Specified file does not exist on filesystem 2 STR_HELPER linux/acs/StrComHandler.h
502 0x5c03 STRHLP_PathNotExists Specified path does not exist 3 STR_HELPER linux/acs/StrComHandler.h
542 0x63a0 NVMB_KeyNotExists Specified key does not exist in json file 160 NVM_PARAM_BASE mission/memory/NvmParameterBase.h
543 0x64a0 FSHLP_SdNotMounted SD card specified with path string not mounted 160 FILE_SYSTEM_HELPER bsp_q7s/fs/FilesystemHelper.h
544 0x64a1 FSHLP_FileNotExists Specified file does not exist on filesystem 161 FILE_SYSTEM_HELPER bsp_q7s/fs/FilesystemHelper.h
545 0x6502 PLMPHLP_InvalidCrc No description 2 PLOC_MPSOC_HELPER linux/payload/ScexHelper.h
546 0x65a0 PLMPHLP_FileClosedAccidentally File accidentally close 160 PLOC_MPSOC_HELPER linux/payload/PlocMpsocHelper.h
547 0x66a0 SADPL_CommandNotSupported No description 160 SA_DEPL_HANDLER mission/SolarArrayDeploymentHandler.h
548 0x66a1 SADPL_DeploymentAlreadyExecuting No description 161 SA_DEPL_HANDLER mission/SolarArrayDeploymentHandler.h
549 0x66a2 SADPL_MainSwitchTimeoutFailure No description 162 SA_DEPL_HANDLER mission/SolarArrayDeploymentHandler.h
550 0x66a3 SADPL_SwitchingDeplSa1Failed No description 163 SA_DEPL_HANDLER mission/SolarArrayDeploymentHandler.h
551 0x66a4 SADPL_SwitchingDeplSa2Failed No description 164 SA_DEPL_HANDLER mission/SolarArrayDeploymentHandler.h
0x6702 MPSOCRTVIF_InvalidCrc No description 2 MPSOC_RETURN_VALUES_IF linux/payload/ScexHelper.h
552 0x67a0 MPSOCRTVIF_CrcFailure Space Packet received from PLOC has invalid CRC 160 MPSOC_RETURN_VALUES_IF linux/payload/mpsocRetvals.h
553 0x67a1 MPSOCRTVIF_ReceivedAckFailure Received ACK failure reply from PLOC 161 MPSOC_RETURN_VALUES_IF linux/payload/mpsocRetvals.h
554 0x67a2 MPSOCRTVIF_ReceivedExeFailure Received execution failure reply from PLOC 162 MPSOC_RETURN_VALUES_IF linux/payload/mpsocRetvals.h
559 0x67a7 MPSOCRTVIF_MpsocFilenameTooLong Filename of MPSoC file is to long (max. 256 bytes) 167 MPSOC_RETURN_VALUES_IF linux/payload/mpsocRetvals.h
560 0x67a8 MPSOCRTVIF_InvalidParameter Command has invalid parameter 168 MPSOC_RETURN_VALUES_IF linux/payload/mpsocRetvals.h
561 0x67a9 MPSOCRTVIF_NameTooLong Received command has file string with invalid length 169 MPSOC_RETURN_VALUES_IF linux/payload/mpsocRetvals.h
0x6801 SPVRTVIF_NoPacketFound No description 1 SUPV_RETURN_VALUES_IF linux/com/SyrlinksComHandler.h
562 0x68a0 SPVRTVIF_CrcFailure Space Packet received from PLOC supervisor has invalid CRC 160 SUPV_RETURN_VALUES_IF linux/payload/plocSupvDefs.h
563 0x68a1 SPVRTVIF_InvalidServiceId No description 161 SUPV_RETURN_VALUES_IF linux/payload/plocSupvDefs.h
564 0x68a2 SPVRTVIF_ReceivedAckFailure Received ACK failure reply from PLOC supervisor 162 SUPV_RETURN_VALUES_IF linux/payload/plocSupvDefs.h

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 284 translations.
* @details
* Generated on: 2023-04-01 15:26:43
* Generated on: 2023-04-04 13:59:07
*/
#include "translateEvents.h"
@ -270,10 +270,10 @@ const char *I2C_UNAVAILABLE_REBOOT_STRING = "I2C_UNAVAILABLE_REBOOT";
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
const char *PLOC_OVERHEATING_STRING = "PLOC_OVERHEATING";
const char *OBC_OVERHEATING_STRING = "OBC_OVERHEATING";
const char *HPA_OVERHEATING_STRING = "HPA_OVERHEATING";
const char *PLPCDU_OVERHEATING_STRING = "PLPCDU_OVERHEATING";
const char *CAMERA_OVERHEATING_STRING = "CAMERA_OVERHEATING";
const char *PCDU_SYSTEM_OVERHEATING_STRING = "PCDU_SYSTEM_OVERHEATING";
const char *HEATER_NOT_OFF_FOR_OFF_MODE_STRING = "HEATER_NOT_OFF_FOR_OFF_MODE";
const char *TX_TIMER_EXPIRED_STRING = "TX_TIMER_EXPIRED";
const char *BIT_LOCK_TX_ON_STRING = "BIT_LOCK_TX_ON";
const char *POSSIBLE_FILE_CORRUPTION_STRING = "POSSIBLE_FILE_CORRUPTION";
@ -822,14 +822,14 @@ const char *translateEvents(Event event) {
return NO_HEALTHY_HEATER_AVAILABLE_STRING;
case (14102):
return SYRLINKS_OVERHEATING_STRING;
case (14103):
return PLOC_OVERHEATING_STRING;
case (14104):
return OBC_OVERHEATING_STRING;
case (14105):
return HPA_OVERHEATING_STRING;
return CAMERA_OVERHEATING_STRING;
case (14106):
return PLPCDU_OVERHEATING_STRING;
return PCDU_SYSTEM_OVERHEATING_STRING;
case (14107):
return HEATER_NOT_OFF_FOR_OFF_MODE_STRING;
case (14201):
return TX_TIMER_EXPIRED_STRING;
case (14202):

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file.
* @details
* Contains 175 translations.
* Generated on: 2023-04-01 15:26:43
* Generated on: 2023-04-04 13:59:07
*/
#include "translateObjects.h"

View File

@ -27,7 +27,7 @@ ReturnValue_t ImtqPollingTask::performOperation(uint8_t operationCode) {
comStatus = returnvalue::OK;
// Stopwatch watch;
switch (currentRequest) {
switch (currentRequest.requestType) {
case imtq::RequestType::MEASURE_NO_ACTUATION: {
// Measured to take 24 ms for debug and release builds.
// Stopwatch watch;
@ -51,6 +51,30 @@ void ImtqPollingTask::handleMeasureStep() {
uint8_t* replyPtr;
ImtqRepliesDefault replies(replyBuf.data());
// If some startup handling is added later, set configured after it was done once.
if (performStartup) {
// Set integration time for the MGM.
cmdBuf[0] = imtq::CC::SET_PARAM;
size_t dummy = 0;
SerializeAdapter::serialize(&imtq::param::INTEGRATION_TIME_SELECT, cmdBuf.data() + 1, &dummy,
cmdBuf.size(), SerializeIF::Endianness::LITTLE);
cmdBuf[3] = currentRequest.integrationTimeSel;
cmdLen = 4;
ReturnValue_t result = performI2cFullRequest(replyBuf.data(), 5);
if (result != returnvalue::OK) {
comStatus = imtq::STARTUP_CFG_ERROR;
}
if (replyBuf[0] != imtq::CC::SET_PARAM) {
sif::error << "ImtqPollingTask: First byte of reply not equal to sent CC" << std::endl;
comStatus = imtq::STARTUP_CFG_ERROR;
}
if (replyBuf[4] != currentRequest.integrationTimeSel) {
sif::error << "ImtqPollingTask: Integration time configuration failed" << std::endl;
comStatus = imtq::STARTUP_CFG_ERROR;
}
currentIntegrationTimeMs =
imtq::integrationTimeFromSelectValue(currentRequest.integrationTimeSel);
performStartup = false;
}
replies.setConfigured();
// Can be used later to verify correct timing (e.g. all data has been read)
@ -73,7 +97,7 @@ void ImtqPollingTask::handleMeasureStep() {
return;
}
if (specialRequest != imtq::SpecialRequest::NONE) {
if (currentRequest.specialRequest != imtq::SpecialRequest::NONE) {
auto executeSelfTest = [&](imtq::selfTest::Axis axis) {
cmdBuf[0] = imtq::CC::SELF_TEST_CMD;
cmdBuf[1] = axis;
@ -81,7 +105,7 @@ void ImtqPollingTask::handleMeasureStep() {
};
// If a self-test is already ongoing, ignore the request.
if (replies.getSystemState()[2] != static_cast<uint8_t>(imtq::mode::SELF_TEST)) {
switch (specialRequest) {
switch (currentRequest.specialRequest) {
case (imtq::SpecialRequest::DO_SELF_TEST_POS_X): {
executeSelfTest(imtq::selfTest::Axis::X_POSITIVE);
break;
@ -234,18 +258,21 @@ ReturnValue_t ImtqPollingTask::initializeInterface(CookieIF* cookie) {
ReturnValue_t ImtqPollingTask::sendMessage(CookieIF* cookie, const uint8_t* sendData,
size_t sendLen) {
const auto* imtqReq = reinterpret_cast<const imtq::Request*>(sendData);
if (sendLen != sizeof(imtq::Request)) {
return returnvalue::FAILED;
}
{
MutexGuard mg(ipcLock);
if (imtqReq->request == imtq::RequestType::ACTUATE) {
std::memcpy(dipoles, imtqReq->dipoles, sizeof(dipoles));
torqueDuration = imtqReq->torqueDuration;
}
currentRequest = imtqReq->request;
specialRequest = imtqReq->specialRequest;
if (state != InternalState::IDLE) {
return returnvalue::FAILED;
}
state = InternalState::IS_BUSY;
if (currentRequest.mode != imtqReq->mode) {
if (imtqReq->mode == acs::SimpleSensorMode::NORMAL) {
performStartup = true;
}
}
std::memcpy(&currentRequest, imtqReq, sendLen);
}
semaphore->release();
@ -345,10 +372,10 @@ void ImtqPollingTask::buildDipoleCommand() {
uint8_t* serPtr = cmdBuf.data() + 1;
size_t serLen = 0;
for (uint8_t idx = 0; idx < 3; idx++) {
SerializeAdapter::serialize(&dipoles[idx], &serPtr, &serLen, cmdBuf.size(),
SerializeAdapter::serialize(&currentRequest.dipoles[idx], &serPtr, &serLen, cmdBuf.size(),
SerializeIF::Endianness::LITTLE);
}
SerializeAdapter::serialize(&torqueDuration, &serPtr, &serLen, cmdBuf.size(),
SerializeAdapter::serialize(&currentRequest.torqueDuration, &serPtr, &serLen, cmdBuf.size(),
SerializeIF::Endianness::LITTLE);
// sif::debug << "Dipole X: " << dipoles[0] << std::endl;
// sif::debug << "Torqeu Dur: " << torqueDuration << std::endl;
@ -357,22 +384,28 @@ void ImtqPollingTask::buildDipoleCommand() {
ReturnValue_t ImtqPollingTask::readReceivedMessage(CookieIF* cookie, uint8_t** buffer,
size_t* size) {
imtq::RequestType currentRequest;
imtq::Request currentRequest;
{
MutexGuard mg(ipcLock);
currentRequest = this->currentRequest;
std::memcpy(&currentRequest, &this->currentRequest, sizeof(currentRequest));
}
size_t replyLen = 0;
MutexGuard mg(bufLock);
if (currentRequest == imtq::RequestType::MEASURE_NO_ACTUATION) {
replyLen = getExchangeBufLen(specialRequest);
memcpy(exchangeBuf.data(), replyBuf.data(), replyLen);
} else if (currentRequest == imtq::RequestType::ACTUATE) {
replyLen = ImtqRepliesWithTorque::BASE_LEN;
memcpy(exchangeBuf.data(), replyBufActuation.data(), replyLen);
} else {
*size = 0;
{
MutexGuard mg(bufLock);
if (currentRequest.requestType == imtq::RequestType::MEASURE_NO_ACTUATION) {
replyLen = getExchangeBufLen(currentRequest.specialRequest);
memcpy(exchangeBuf.data(), replyBuf.data(), replyLen);
} else if (currentRequest.requestType == imtq::RequestType::ACTUATE) {
replyLen = ImtqRepliesWithTorque::BASE_LEN;
memcpy(exchangeBuf.data(), replyBufActuation.data(), replyLen);
} else {
*size = 0;
}
}
{
MutexGuard mg(ipcLock);
this->currentRequest.requestType = imtq::RequestType::DO_NOTHING;
}
*buffer = exchangeBuf.data();
*size = replyLen;
@ -417,6 +450,7 @@ void ImtqPollingTask::clearReadFlagsWithTorque(ImtqRepliesWithTorque& replies) {
ReturnValue_t ImtqPollingTask::performI2cFullRequest(uint8_t* reply, size_t replyLen) {
int fd = 0;
if (cmdLen == 0 or reply == nullptr) {
sif::error << "ImtqPollingTask: Command lenght is zero or reply PTR is invalid" << std::endl;
return returnvalue::FAILED;
}

View File

@ -3,6 +3,7 @@
#include <fsfw/tasks/SemaphoreIF.h>
#include <fsfw_hal/linux/i2c/I2cCookie.h>
#include <mission/acs/acsBoardPolling.h>
#include <atomic>
@ -24,7 +25,6 @@ class ImtqPollingTask : public SystemObject,
static constexpr ReturnValue_t NO_REPLY_AVAILABLE = returnvalue::makeCode(2, 0);
enum class InternalState { IDLE, IS_BUSY } state = InternalState::IDLE;
imtq::RequestType currentRequest = imtq::RequestType::MEASURE_NO_ACTUATION;
SemaphoreIF* semaphore;
ReturnValue_t comStatus = returnvalue::OK;
@ -38,10 +38,9 @@ class ImtqPollingTask : public SystemObject,
// Required in addition to integration time, otherwise old data might be read.
static constexpr uint32_t MGM_READ_BUFFER_TIME_MS = 6;
bool ignoreNextActuateRequest = false;
bool performStartup = false;
imtq::SpecialRequest specialRequest = imtq::SpecialRequest::NONE;
int16_t dipoles[3] = {};
uint16_t torqueDuration = 0;
imtq::Request currentRequest{};
std::array<uint8_t, 32> cmdBuf;
std::array<uint8_t, 524> replyBuf;

View File

@ -42,7 +42,6 @@ ReturnValue_t StrComHandler::performOperation(uint8_t operationCode) {
while (true) {
lock->lockMutex();
state = InternalState::SLEEPING;
datalinkLayer.reset();
lock->unlockMutex();
semaphore.acquire();
switch (state) {
@ -58,6 +57,7 @@ ReturnValue_t StrComHandler::performOperation(uint8_t operationCode) {
}
case InternalState::UPLOAD_IMAGE: {
replyTimeout.setTimeout(200);
resetReplyHandlingState();
result = performImageUpload();
if (result == returnvalue::OK) {
triggerEvent(IMAGE_UPLOAD_SUCCESSFUL);
@ -68,6 +68,7 @@ ReturnValue_t StrComHandler::performOperation(uint8_t operationCode) {
}
case InternalState::DOWNLOAD_IMAGE: {
replyTimeout.setTimeout(200);
resetReplyHandlingState();
result = performImageDownload();
if (result == returnvalue::OK) {
triggerEvent(IMAGE_DOWNLOAD_SUCCESSFUL);
@ -78,6 +79,7 @@ ReturnValue_t StrComHandler::performOperation(uint8_t operationCode) {
}
case InternalState::FLASH_READ: {
replyTimeout.setTimeout(200);
resetReplyHandlingState();
result = performFlashRead();
if (result == returnvalue::OK) {
triggerEvent(FLASH_READ_SUCCESSFUL);
@ -88,6 +90,7 @@ ReturnValue_t StrComHandler::performOperation(uint8_t operationCode) {
}
case InternalState::FIRMWARE_UPDATE: {
replyTimeout.setTimeout(200);
resetReplyHandlingState();
result = performFirmwareUpdate();
if (result == returnvalue::OK) {
triggerEvent(FIRMWARE_UPDATE_SUCCESSFUL);
@ -645,7 +648,8 @@ ReturnValue_t StrComHandler::sendMessage(CookieIF* cookie, const uint8_t* sendDa
return BUSY;
}
}
serial::flushRxBuf(serialPort);
// Ensure consistent state.
resetReplyHandlingState();
const uint8_t* txFrame;
size_t frameLen;
@ -697,6 +701,7 @@ ReturnValue_t StrComHandler::readReceivedMessage(CookieIF* cookie, uint8_t** buf
*buffer = const_cast<uint8_t*>(replyPtr);
*size = replyLen;
}
replyLen = 0;
return replyResult;
}
@ -781,3 +786,8 @@ ReturnValue_t StrComHandler::readOneReply(uint32_t failParameter) {
}
}
}
void StrComHandler::resetReplyHandlingState() {
serial::flushRxBuf(serialPort);
datalinkLayer.reset();
}

View File

@ -374,6 +374,8 @@ class StrComHandler : public SystemObject, public DeviceCommunicationIF, public
* @return
*/
ReturnValue_t readOneReply(uint32_t failParameter);
void resetReplyHandlingState();
};
#endif /* BSP_Q7S_DEVICES_STRHELPER_H_ */

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 284 translations.
* @details
* Generated on: 2023-04-01 15:26:43
* Generated on: 2023-04-04 13:59:07
*/
#include "translateEvents.h"
@ -209,13 +209,11 @@ const char *TRANSITION_OTHER_SIDE_FAILED_STRING = "TRANSITION_OTHER_SIDE_FAILED"
const char *NOT_ENOUGH_DEVICES_DUAL_MODE_STRING = "NOT_ENOUGH_DEVICES_DUAL_MODE";
const char *POWER_STATE_MACHINE_TIMEOUT_STRING = "POWER_STATE_MACHINE_TIMEOUT";
const char *SIDE_SWITCH_TRANSITION_NOT_ALLOWED_STRING = "SIDE_SWITCH_TRANSITION_NOT_ALLOWED";
const char *DIRECT_TRANSITION_TO_DUAL_OTHER_GPS_FAULTY_STRING =
"DIRECT_TRANSITION_TO_DUAL_OTHER_GPS_FAULTY";
const char *DIRECT_TRANSITION_TO_DUAL_OTHER_GPS_FAULTY_STRING = "DIRECT_TRANSITION_TO_DUAL_OTHER_GPS_FAULTY";
const char *TRANSITION_OTHER_SIDE_FAILED_12900_STRING = "TRANSITION_OTHER_SIDE_FAILED_12900";
const char *NOT_ENOUGH_DEVICES_DUAL_MODE_12901_STRING = "NOT_ENOUGH_DEVICES_DUAL_MODE_12901";
const char *POWER_STATE_MACHINE_TIMEOUT_12902_STRING = "POWER_STATE_MACHINE_TIMEOUT_12902";
const char *SIDE_SWITCH_TRANSITION_NOT_ALLOWED_12903_STRING =
"SIDE_SWITCH_TRANSITION_NOT_ALLOWED_12903";
const char *SIDE_SWITCH_TRANSITION_NOT_ALLOWED_12903_STRING = "SIDE_SWITCH_TRANSITION_NOT_ALLOWED_12903";
const char *CHILDREN_LOST_MODE_STRING = "CHILDREN_LOST_MODE";
const char *GPS_FIX_CHANGE_STRING = "GPS_FIX_CHANGE";
const char *CANT_GET_FIX_STRING = "CANT_GET_FIX";
@ -272,10 +270,10 @@ const char *I2C_UNAVAILABLE_REBOOT_STRING = "I2C_UNAVAILABLE_REBOOT";
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
const char *PLOC_OVERHEATING_STRING = "PLOC_OVERHEATING";
const char *OBC_OVERHEATING_STRING = "OBC_OVERHEATING";
const char *HPA_OVERHEATING_STRING = "HPA_OVERHEATING";
const char *PLPCDU_OVERHEATING_STRING = "PLPCDU_OVERHEATING";
const char *CAMERA_OVERHEATING_STRING = "CAMERA_OVERHEATING";
const char *PCDU_SYSTEM_OVERHEATING_STRING = "PCDU_SYSTEM_OVERHEATING";
const char *HEATER_NOT_OFF_FOR_OFF_MODE_STRING = "HEATER_NOT_OFF_FOR_OFF_MODE";
const char *TX_TIMER_EXPIRED_STRING = "TX_TIMER_EXPIRED";
const char *BIT_LOCK_TX_ON_STRING = "BIT_LOCK_TX_ON";
const char *POSSIBLE_FILE_CORRUPTION_STRING = "POSSIBLE_FILE_CORRUPTION";
@ -824,14 +822,14 @@ const char *translateEvents(Event event) {
return NO_HEALTHY_HEATER_AVAILABLE_STRING;
case (14102):
return SYRLINKS_OVERHEATING_STRING;
case (14103):
return PLOC_OVERHEATING_STRING;
case (14104):
return OBC_OVERHEATING_STRING;
case (14105):
return HPA_OVERHEATING_STRING;
return CAMERA_OVERHEATING_STRING;
case (14106):
return PLPCDU_OVERHEATING_STRING;
return PCDU_SYSTEM_OVERHEATING_STRING;
case (14107):
return HEATER_NOT_OFF_FOR_OFF_MODE_STRING;
case (14201):
return TX_TIMER_EXPIRED_STRING;
case (14202):

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file.
* @details
* Contains 175 translations.
* Generated on: 2023-04-01 15:26:43
* Generated on: 2023-04-04 13:59:07
*/
#include "translateObjects.h"

View File

@ -1,5 +1,7 @@
#include "AxiPtmeConfig.h"
#include <fsfw/ipc/MutexGuard.h>
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw_hal/linux/uio/UioMapper.h"
@ -39,97 +41,59 @@ ReturnValue_t AxiPtmeConfig::writeCaduRateReg(uint8_t rateVal) {
return returnvalue::OK;
}
ReturnValue_t AxiPtmeConfig::enableTxclockManipulator() {
ReturnValue_t result = writeBit(COMMON_CONFIG_REG, true, BitPos::EN_TX_CLK_MANIPULATOR);
if (result != returnvalue::OK) {
return result;
}
return returnvalue::OK;
void AxiPtmeConfig::enableTxclockManipulator() {
writeBit(COMMON_CONFIG_REG, true, BitPos::EN_TX_CLK_MANIPULATOR);
}
ReturnValue_t AxiPtmeConfig::disableTxclockManipulator() {
ReturnValue_t result = writeBit(COMMON_CONFIG_REG, false, BitPos::EN_TX_CLK_MANIPULATOR);
if (result != returnvalue::OK) {
return result;
}
return returnvalue::OK;
void AxiPtmeConfig::disableTxclockManipulator() {
writeBit(COMMON_CONFIG_REG, false, BitPos::EN_TX_CLK_MANIPULATOR);
}
ReturnValue_t AxiPtmeConfig::enableTxclockInversion() {
ReturnValue_t result = writeBit(COMMON_CONFIG_REG, true, BitPos::INVERT_CLOCK);
if (result != returnvalue::OK) {
return result;
}
return returnvalue::OK;
void AxiPtmeConfig::enableTxclockInversion() {
writeBit(COMMON_CONFIG_REG, true, BitPos::INVERT_CLOCK);
}
ReturnValue_t AxiPtmeConfig::disableTxclockInversion() {
ReturnValue_t result = writeBit(COMMON_CONFIG_REG, false, BitPos::INVERT_CLOCK);
if (result != returnvalue::OK) {
return result;
}
return returnvalue::OK;
void AxiPtmeConfig::disableTxclockInversion() {
writeBit(COMMON_CONFIG_REG, false, BitPos::INVERT_CLOCK);
}
ReturnValue_t AxiPtmeConfig::enableBatPriorityBit() {
ReturnValue_t result = writeBit(COMMON_CONFIG_REG, true, BitPos::EN_BAT_PRIORITY);
if (result != returnvalue::OK) {
return result;
}
return returnvalue::OK;
void AxiPtmeConfig::enableBatPriorityBit() {
writeBit(COMMON_CONFIG_REG, true, BitPos::EN_BAT_PRIORITY);
}
ReturnValue_t AxiPtmeConfig::disableBatPriorityBit() {
ReturnValue_t result = writeBit(COMMON_CONFIG_REG, false, BitPos::EN_BAT_PRIORITY);
if (result != returnvalue::OK) {
return result;
}
return returnvalue::OK;
void AxiPtmeConfig::disableBatPriorityBit() {
writeBit(COMMON_CONFIG_REG, false, BitPos::EN_BAT_PRIORITY);
}
ReturnValue_t AxiPtmeConfig::writeReg(uint32_t regOffset, uint32_t writeVal) {
ReturnValue_t result = returnvalue::OK;
result = mutex->lockMutex(timeoutType, mutexTimeout);
if (result != returnvalue::OK) {
sif::warning << "AxiPtmeConfig::readReg: Failed to lock mutex" << std::endl;
return returnvalue::FAILED;
}
void AxiPtmeConfig::writeReg(uint32_t regOffset, uint32_t writeVal) {
MutexGuard mg(mutex, timeoutType, mutexTimeout);
*(baseAddress + regOffset / ADRESS_DIVIDER) = writeVal;
result = mutex->unlockMutex();
if (result != returnvalue::OK) {
sif::warning << "AxiPtmeConfig::readReg: Failed to unlock mutex" << std::endl;
return returnvalue::FAILED;
}
return returnvalue::OK;
}
ReturnValue_t AxiPtmeConfig::readReg(uint32_t regOffset, uint32_t* readVal) {
ReturnValue_t result = returnvalue::OK;
result = mutex->lockMutex(timeoutType, mutexTimeout);
if (result != returnvalue::OK) {
sif::warning << "AxiPtmeConfig::readReg: Failed to lock mutex" << std::endl;
return returnvalue::FAILED;
}
*readVal = *(baseAddress + regOffset / ADRESS_DIVIDER);
result = mutex->unlockMutex();
if (result != returnvalue::OK) {
sif::warning << "AxiPtmeConfig::readReg: Failed to unlock mutex" << std::endl;
return returnvalue::FAILED;
}
return returnvalue::OK;
uint32_t AxiPtmeConfig::readReg(uint32_t regOffset) {
MutexGuard mg(mutex, timeoutType, mutexTimeout);
return *(baseAddress + regOffset / ADRESS_DIVIDER);
}
ReturnValue_t AxiPtmeConfig::writeBit(uint32_t regOffset, bool bitVal, BitPos bitPos) {
uint32_t readVal = 0;
ReturnValue_t result = readReg(regOffset, &readVal);
if (result != returnvalue::OK) {
return result;
}
void AxiPtmeConfig::writePollThreshold(AxiPtmeConfig::IdlePollThreshold pollThreshold) {
uint32_t regVal = readCommonCfgReg();
// Clear bits first
regVal &= ~(0b111 << 3);
regVal |= (static_cast<uint8_t>(pollThreshold) << 3);
writeCommonCfgReg(regVal);
}
AxiPtmeConfig::IdlePollThreshold AxiPtmeConfig::readPollThreshold() {
uint32_t regVal = readCommonCfgReg();
return static_cast<AxiPtmeConfig::IdlePollThreshold>((regVal >> 3) & 0b111);
}
void AxiPtmeConfig::writeCommonCfgReg(uint32_t value) { writeReg(COMMON_CONFIG_REG, value); }
uint32_t AxiPtmeConfig::readCommonCfgReg() { return readReg(COMMON_CONFIG_REG); }
void AxiPtmeConfig::writeBit(uint32_t regOffset, bool bitVal, BitPos bitPos) {
uint32_t readVal = readReg(regOffset);
uint32_t writeVal =
(readVal & ~(1 << static_cast<uint32_t>(bitPos))) | bitVal << static_cast<uint32_t>(bitPos);
result = writeReg(regOffset, writeVal);
if (result != returnvalue::OK) {
return result;
}
return returnvalue::OK;
writeReg(regOffset, writeVal);
}

View File

@ -14,6 +14,16 @@
*/
class AxiPtmeConfig : public SystemObject {
public:
enum IdlePollThreshold : uint8_t {
ALWAYS = 0b000,
POLL_1 = 0b001,
POLL_4 = 0b010,
POLL_16 = 0b011,
POLL_64 = 0b100,
POLL_256 = 0b101,
POLL_1024 = 0b110,
NEVER = 0b111
};
/**
* @brief Constructor
* @param axiUio Device file of UIO belonging to the AXI configuration interface.
@ -40,8 +50,8 @@ class AxiPtmeConfig : public SystemObject {
* Default: Enables TX clock manipulator
*
*/
ReturnValue_t enableTxclockManipulator();
ReturnValue_t disableTxclockManipulator();
void enableTxclockManipulator();
void disableTxclockManipulator();
/**
* @brief The next to functions control whether data will be updated on the rising or falling edge
@ -51,11 +61,14 @@ class AxiPtmeConfig : public SystemObject {
* Disable clock inversion. Data updated on rising edge.
* Default: Inversion is disabled
*/
ReturnValue_t enableTxclockInversion();
ReturnValue_t disableTxclockInversion();
void enableTxclockInversion();
void disableTxclockInversion();
ReturnValue_t enableBatPriorityBit();
ReturnValue_t disableBatPriorityBit();
void enableBatPriorityBit();
void disableBatPriorityBit();
void writePollThreshold(IdlePollThreshold pollThreshold);
IdlePollThreshold readPollThreshold();
private:
// Address of register storing the bitrate configuration parameter
@ -80,7 +93,7 @@ class AxiPtmeConfig : public SystemObject {
*
* @param writeVal Value to write
*/
ReturnValue_t writeReg(uint32_t regOffset, uint32_t writeVal);
void writeReg(uint32_t regOffset, uint32_t writeVal);
/**
* @brief Reads value from configuration register
@ -88,7 +101,10 @@ class AxiPtmeConfig : public SystemObject {
* @param regOffset Offset of register from base address to read from
* Qparam readVal Pointer to variable where read value will be written to
*/
ReturnValue_t readReg(uint32_t regOffset, uint32_t* readVal);
uint32_t readReg(uint32_t regOffset);
uint32_t readCommonCfgReg();
void writeCommonCfgReg(uint32_t value);
/**
* @brief Sets one bit in a register
@ -99,7 +115,7 @@ class AxiPtmeConfig : public SystemObject {
*
* @return returnvalue::OK if successful, otherwise returnvalue::FAILED
*/
ReturnValue_t writeBit(uint32_t regOffset, bool bitVal, BitPos bitPos);
void writeBit(uint32_t regOffset, bool bitVal, BitPos bitPos);
};
#endif /* LINUX_OBC_AXIPTMECONFIG_H_ */

View File

@ -26,33 +26,30 @@ ReturnValue_t PtmeConfig::setRate(uint32_t bitRate) {
return axiPtmeConfig->writeCaduRateReg(static_cast<uint8_t>(rateVal));
}
ReturnValue_t PtmeConfig::invertTxClock(bool invert) {
ReturnValue_t result = returnvalue::OK;
void PtmeConfig::invertTxClock(bool invert) {
if (invert) {
result = axiPtmeConfig->enableTxclockInversion();
axiPtmeConfig->enableTxclockInversion();
} else {
result = axiPtmeConfig->disableTxclockInversion();
axiPtmeConfig->disableTxclockInversion();
}
if (result != returnvalue::OK) {
return CLK_INVERSION_FAILED;
}
return result;
}
ReturnValue_t PtmeConfig::configTxManipulator(bool enable) {
ReturnValue_t result = returnvalue::OK;
void PtmeConfig::configTxManipulator(bool enable) {
if (enable) {
result = axiPtmeConfig->enableTxclockManipulator();
axiPtmeConfig->enableTxclockManipulator();
} else {
result = axiPtmeConfig->disableTxclockManipulator();
axiPtmeConfig->disableTxclockManipulator();
}
return result;
}
ReturnValue_t PtmeConfig::enableBatPriorityBit(bool enable) {
void PtmeConfig::enableBatPriorityBit(bool enable) {
if (enable) {
return axiPtmeConfig->enableBatPriorityBit();
axiPtmeConfig->enableBatPriorityBit();
} else {
return axiPtmeConfig->disableBatPriorityBit();
axiPtmeConfig->disableBatPriorityBit();
}
}
void PtmeConfig::setPollThreshold(AxiPtmeConfig::IdlePollThreshold pollThreshold) {
axiPtmeConfig->writePollThreshold(pollThreshold);
}

View File

@ -43,7 +43,7 @@ class PtmeConfig : public SystemObject {
*
* @return REUTRN_OK if successful, otherwise error return value
*/
ReturnValue_t invertTxClock(bool invert);
void invertTxClock(bool invert);
/**
* @brief Controls the tx clock manipulator of the PTME wrapper component
@ -53,7 +53,7 @@ class PtmeConfig : public SystemObject {
*
* @return REUTRN_OK if successful, otherwise error return value
*/
ReturnValue_t configTxManipulator(bool enable);
void configTxManipulator(bool enable);
/**
* Enable the bat priority bit in the PTME wrapper component.
@ -62,7 +62,9 @@ class PtmeConfig : public SystemObject {
* @param enable
* @return
*/
ReturnValue_t enableBatPriorityBit(bool enable);
void enableBatPriorityBit(bool enable);
void setPollThreshold(AxiPtmeConfig::IdlePollThreshold pollThreshold);
private:
static const uint8_t INTERFACE_ID = CLASS_ID::RATE_SETTER;

View File

@ -17,7 +17,7 @@ static constexpr bool DEBUG_MODE = true;
SolarArrayDeploymentHandler::SolarArrayDeploymentHandler(object_id_t setObjectId_,
GpioIF& gpioInterface,
PowerSwitchIF& mainLineSwitcher_,
pcdu::Switches mainLineSwitch_,
power::Switches mainLineSwitch_,
gpioId_t deplSA1, gpioId_t deplSA2,
SdCardMountedIF& sdcMountedIF)
: SystemObject(setObjectId_),

View File

@ -107,7 +107,7 @@ class SolarArrayDeploymentHandler : public ExecutableObjectIF,
* @param burnTimeMs Time duration the power will be applied to the burn wires.
*/
SolarArrayDeploymentHandler(object_id_t setObjectId, GpioIF& gpio,
PowerSwitchIF& mainLineSwitcher, pcdu::Switches mainLineSwitch,
PowerSwitchIF& mainLineSwitcher, power::Switches mainLineSwitch,
gpioId_t deplSA1, gpioId_t deplSA2, SdCardMountedIF& sdcMountedIF);
virtual ~SolarArrayDeploymentHandler();

View File

@ -151,19 +151,25 @@ void ImtqHandler::doStartUp() {
}
void ImtqHandler::doShutDown() {
updatePeriodicReply(false, imtq::cmdIds::REPLY_NO_TORQUE);
updatePeriodicReply(false, imtq::cmdIds::REPLY_WITH_TORQUE);
specialRequestActive = false;
firstReplyCycle = true;
internalState = InternalState::NONE;
commandExecuted = false;
statusSet.setValidity(false, true);
rawMtmNoTorque.setValidity(false, true);
rawMtmWithTorque.setValidity(false, true);
hkDatasetNoTorque.setValidity(false, true);
hkDatasetWithTorque.setValidity(false, true);
calMtmMeasurementSet.setValidity(false, true);
setMode(_MODE_POWER_DOWN);
if (internalState != InternalState::SHUTDOWN) {
commandExecuted = false;
internalState = InternalState::SHUTDOWN;
}
if (internalState == InternalState::SHUTDOWN and commandExecuted) {
updatePeriodicReply(false, imtq::cmdIds::REPLY_NO_TORQUE);
updatePeriodicReply(false, imtq::cmdIds::REPLY_WITH_TORQUE);
specialRequestActive = false;
firstReplyCycle = true;
internalState = InternalState::NONE;
commandExecuted = false;
statusSet.setValidity(false, true);
rawMtmNoTorque.setValidity(false, true);
rawMtmWithTorque.setValidity(false, true);
hkDatasetNoTorque.setValidity(false, true);
hkDatasetWithTorque.setValidity(false, true);
calMtmMeasurementSet.setValidity(false, true);
setMode(_MODE_POWER_DOWN);
}
}
ReturnValue_t ImtqHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) {
@ -178,7 +184,7 @@ ReturnValue_t ImtqHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) {
}
default: {
*id = imtq::cmdIds::REQUEST;
request.request = imtq::RequestType::DO_NOTHING;
request.requestType = imtq::RequestType::DO_NOTHING;
request.specialRequest = imtq::SpecialRequest::NONE;
expectedReply = DeviceHandlerIF::NO_COMMAND_ID;
rawPacket = reinterpret_cast<uint8_t*>(&request);
@ -190,7 +196,7 @@ ReturnValue_t ImtqHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) {
}
ReturnValue_t ImtqHandler::buildTransitionDeviceCommand(DeviceCommandId_t* id) {
if (internalState == InternalState::STARTUP) {
if (internalState == InternalState::STARTUP or internalState == InternalState::SHUTDOWN) {
*id = imtq::cmdIds::REQUEST;
return buildCommandFromCommand(*id, nullptr, 0);
}
@ -201,7 +207,7 @@ ReturnValue_t ImtqHandler::buildCommandFromCommand(DeviceCommandId_t deviceComma
const uint8_t* commandData,
size_t commandDataLen) {
auto genericSpecialRequest = [&](imtq::SpecialRequest specialRequest) {
request.request = imtq::RequestType::MEASURE_NO_ACTUATION;
request.requestType = imtq::RequestType::MEASURE_NO_ACTUATION;
request.specialRequest = specialRequest;
expectedReply = imtq::cmdIds::REPLY_NO_TORQUE;
specialRequestActive = true;
@ -238,9 +244,16 @@ ReturnValue_t ImtqHandler::buildCommandFromCommand(DeviceCommandId_t deviceComma
return returnvalue::OK;
}
case (imtq::cmdIds::REQUEST): {
request.request = imtq::RequestType::MEASURE_NO_ACTUATION;
request.requestType = imtq::RequestType::MEASURE_NO_ACTUATION;
request.specialRequest = imtq::SpecialRequest::NONE;
// 6 ms integration time instead of 10 ms.
request.integrationTimeSel = 2;
expectedReply = imtq::cmdIds::REPLY_NO_TORQUE;
if (internalState == InternalState::SHUTDOWN) {
request.mode = acs::SimpleSensorMode::OFF;
} else {
request.mode = acs::SimpleSensorMode::NORMAL;
}
rawPacket = reinterpret_cast<uint8_t*>(&request);
rawPacketLen = sizeof(imtq::Request);
return returnvalue::OK;
@ -267,7 +280,7 @@ ReturnValue_t ImtqHandler::buildCommandFromCommand(DeviceCommandId_t deviceComma
}
expectedReply = imtq::cmdIds::REPLY_WITH_TORQUE;
request.request = imtq::RequestType::ACTUATE;
request.requestType = imtq::RequestType::ACTUATE;
request.specialRequest = imtq::SpecialRequest::NONE;
std::memcpy(request.dipoles, dipoleSet.dipoles.value, sizeof(request.dipoles));
request.torqueDuration = dipoleSet.currentTorqueDurationMs.value;
@ -309,6 +322,9 @@ ReturnValue_t ImtqHandler::scanForReply(const uint8_t* start, size_t remainingSi
if (getMode() == _MODE_WAIT_OFF or getMode() == _MODE_WAIT_ON or getMode() == _MODE_POWER_DOWN) {
return IGNORE_FULL_PACKET;
}
if (internalState == InternalState::SHUTDOWN) {
commandExecuted = true;
}
if (remainingSize > 0) {
*foundLen = remainingSize;
*foundId = expectedReply;

View File

@ -1,13 +1,13 @@
#ifndef MISSION_DEVICES_DEVICEDEFINITIONS_ACSPOLLING_H_
#define MISSION_DEVICES_DEVICEDEFINITIONS_ACSPOLLING_H_
#include <mission/acs/defs.h>
#include "fsfw/thermal/tcsDefinitions.h"
#include "gyroAdisHelpers.h"
namespace acs {
enum SimpleSensorMode { NORMAL = 0, OFF = 1 };
struct Adis1650XRequest {
SimpleSensorMode mode;
adis1650x::Type type;

View File

@ -6,6 +6,8 @@
namespace acs {
enum class SimpleSensorMode { NORMAL = 0, OFF = 1 };
// These modes are the submodes of the ACS controller and the modes of the ACS subsystem.
enum AcsMode : Mode_t {
OFF = HasModesIF::MODE_OFF,

View File

@ -1,5 +1,26 @@
#include "imtqHelpers.h"
uint16_t imtq::integrationTimeFromSelectValue(uint8_t value) {
switch (value) {
case (0):
return 2;
case (1):
return 3;
case (2):
return 6;
case (3):
return 10;
case (4):
return 20;
case (5):
return 40;
case (6):
return 80;
default:
return 10;
}
}
size_t imtq::getReplySize(CC::CC cc, size_t* optSecondSize) {
switch (cc) {
// Software reset is a bit special and can also cause a I2C NAK because

View File

@ -5,6 +5,7 @@
#include <fsfw/datapool/PoolReadGuard.h>
#include <fsfw/datapoollocal/StaticLocalDataSet.h>
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
#include <mission/acs/defs.h>
class ImtqHandler;
@ -13,6 +14,8 @@ class ImtqHandler;
namespace imtq {
uint16_t integrationTimeFromSelectValue(uint8_t value);
enum class RequestType : uint8_t { MEASURE_NO_ACTUATION, ACTUATE, DO_NOTHING };
enum class SpecialRequest : uint8_t {
@ -27,7 +30,8 @@ enum class SpecialRequest : uint8_t {
};
struct Request {
imtq::RequestType request = imtq::RequestType::MEASURE_NO_ACTUATION;
acs::SimpleSensorMode mode = acs::SimpleSensorMode::OFF;
imtq::RequestType requestType = imtq::RequestType::MEASURE_NO_ACTUATION;
imtq::SpecialRequest specialRequest = imtq::SpecialRequest::NONE;
uint8_t integrationTimeSel = 3;
int16_t dipoles[3]{};
@ -57,9 +61,10 @@ static const ReturnValue_t CC_UNAVAILABLE = MAKE_RETURN_CODE(5);
static const ReturnValue_t INTERNAL_PROCESSING_ERROR = MAKE_RETURN_CODE(6);
static const ReturnValue_t REJECTED_WITHOUT_REASON = MAKE_RETURN_CODE(7);
static const ReturnValue_t CMD_ERR_UNKNOWN = MAKE_RETURN_CODE(8);
static constexpr ReturnValue_t STARTUP_CFG_ERROR = MAKE_RETURN_CODE(9);
//! [EXPORT] : [COMMENT] The status reply to a self test command was received but no self test
//! command has been sent. This should normally never happen.
static const ReturnValue_t UNEXPECTED_SELF_TEST_REPLY = MAKE_RETURN_CODE(0xA7);
static const ReturnValue_t UNEXPECTED_SELF_TEST_REPLY = MAKE_RETURN_CODE(10);
namespace cmdIds {
@ -162,6 +167,13 @@ enum CC : uint8_t {
} // namespace CC
namespace param {
static constexpr uint16_t SEL_MTM = 0x2002;
static constexpr uint16_t INTEGRATION_TIME_SELECT = 0x2003;
} // namespace param
size_t getReplySize(CC::CC cc, size_t* optSecondSize = nullptr);
namespace mode {

View File

@ -56,6 +56,49 @@ StarTrackerHandler::StarTrackerHandler(object_id_t objectId, object_id_t comIF,
StarTrackerHandler::~StarTrackerHandler() {}
void StarTrackerHandler::doStartUp() {
switch (startupState) {
case StartupState::IDLE:
startupState = StartupState::CHECK_PROGRAM;
return;
case StartupState::BOOT_BOOTLOADER:
// This step is required in case the star tracker is already in firmware mode to harmonize
// the device handler's submode to the star tracker's mode
return;
case StartupState::DONE:
if (jcfgCountdown.isBusy()) {
startupState = StartupState::WAIT_JCFG;
return;
}
startupState = StartupState::IDLE;
break;
case StartupState::WAIT_JCFG: {
if (jcfgCountdown.hasTimedOut()) {
startupState = StartupState::IDLE;
break;
}
return;
}
default:
return;
}
solutionSet.setReportingEnabled(true);
startupState = StartupState::DONE;
internalState = InternalState::IDLE;
setMode(_MODE_TO_ON);
}
void StarTrackerHandler::doShutDown() {
// If the star tracker is shutdown also stop all running processes in the image loader task
strHelper->stopProcess();
internalState = InternalState::IDLE;
startupState = StartupState::IDLE;
bootState = FwBootState::NONE;
solutionSet.setReportingEnabled(false);
reinitNextSetParam = false;
setMode(_MODE_POWER_DOWN);
}
ReturnValue_t StarTrackerHandler::initialize() {
ReturnValue_t result = returnvalue::OK;
result = DeviceHandlerBase::initialize();
@ -236,49 +279,6 @@ void StarTrackerHandler::performOperationHook() {
Submode_t StarTrackerHandler::getInitialSubmode() { return SUBMODE_BOOTLOADER; }
void StarTrackerHandler::doStartUp() {
switch (startupState) {
case StartupState::IDLE:
startupState = StartupState::CHECK_PROGRAM;
return;
case StartupState::BOOT_BOOTLOADER:
// This step is required in case the star tracker is already in firmware mode to harmonize
// the device handler's submode to the star tracker's mode
return;
case StartupState::DONE:
if (jcfgCountdown.isBusy()) {
startupState = StartupState::WAIT_JCFG;
return;
}
startupState = StartupState::IDLE;
break;
case StartupState::WAIT_JCFG: {
if (jcfgCountdown.hasTimedOut()) {
startupState = StartupState::IDLE;
break;
}
return;
}
default:
return;
}
solutionSet.setReportingEnabled(true);
startupState = StartupState::DONE;
internalState = InternalState::IDLE;
setMode(_MODE_TO_ON);
}
void StarTrackerHandler::doShutDown() {
// If the star tracker is shutdown also stop all running processes in the image loader task
strHelper->stopProcess();
internalState = InternalState::IDLE;
startupState = StartupState::IDLE;
bootState = FwBootState::NONE;
solutionSet.setReportingEnabled(false);
reinitNextSetParam = false;
setMode(_MODE_POWER_DOWN);
}
ReturnValue_t StarTrackerHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) {
if (strHelperHandlingSpecialRequest) {
return NOTHING_TO_SEND;
@ -831,7 +831,6 @@ void StarTrackerHandler::bootBootloader() {
ReturnValue_t StarTrackerHandler::scanForReply(const uint8_t* start, size_t remainingSize,
DeviceCommandId_t* foundId, size_t* foundLen) {
ReturnValue_t result = returnvalue::OK;
size_t bytesLeft = 0;
if (remainingSize == 0) {
*foundLen = remainingSize;
@ -845,24 +844,24 @@ ReturnValue_t StarTrackerHandler::scanForReply(const uint8_t* start, size_t rema
switch (startracker::getReplyFrameType(start)) {
case TMTC_ACTIONREPLY: {
*foundLen = remainingSize - bytesLeft;
result = scanForActionReply(startracker::getId(start), foundId);
*foundLen = remainingSize;
return scanForActionReply(startracker::getId(start), foundId);
break;
}
case TMTC_SETPARAMREPLY: {
*foundLen = remainingSize - bytesLeft;
result = scanForSetParameterReply(startracker::getId(start), foundId);
*foundLen = remainingSize;
return scanForSetParameterReply(startracker::getId(start), foundId);
break;
}
case TMTC_PARAMREPLY: {
*foundLen = remainingSize - bytesLeft;
result = scanForGetParameterReply(startracker::getId(start), foundId);
*foundLen = remainingSize;
return scanForGetParameterReply(startracker::getId(start), foundId);
break;
}
case TMTC_TELEMETRYREPLYA:
case TMTC_TELEMETRYREPLY: {
*foundLen = remainingSize - bytesLeft;
result = scanForTmReply(startracker::getId(start), foundId);
*foundLen = remainingSize;
return scanForTmReply(startracker::getId(start), foundId);
break;
}
default: {
@ -870,9 +869,6 @@ ReturnValue_t StarTrackerHandler::scanForReply(const uint8_t* start, size_t rema
result = returnvalue::FAILED;
}
}
remainingSize = bytesLeft;
return result;
}

View File

@ -75,11 +75,9 @@ ReturnValue_t CcsdsIpCoreHandler::initialize() {
}
// This also pulls the PTME out of reset state.
if (batPriorityParam == 0) {
disablePrioritySelectMode();
} else {
enablePrioritySelectMode();
}
updateBatPriorityFromParam();
ptmeConfig.setPollThreshold(
static_cast<AxiPtmeConfig::IdlePollThreshold>(params.pollThresholdParam));
resetPtme();
ptmeLocked = false;
@ -123,7 +121,10 @@ ReturnValue_t CcsdsIpCoreHandler::getParameter(uint8_t domainId, uint8_t uniqueI
ParameterWrapper* parameterWrapper,
const ParameterWrapper* newValues,
uint16_t startAtIndex) {
if ((domainId == 0) and (uniqueIdentifier == ParamId::BAT_PRIORITY)) {
if (domainId != 0) {
return HasParametersIF::INVALID_DOMAIN_ID;
}
if (uniqueIdentifier == ParamId::BAT_PRIORITY) {
uint8_t newVal = 0;
ReturnValue_t result = newValues->getElement(&newVal);
if (result != returnvalue::OK) {
@ -132,8 +133,8 @@ ReturnValue_t CcsdsIpCoreHandler::getParameter(uint8_t domainId, uint8_t uniqueI
if (newVal > 1) {
return HasParametersIF::INVALID_VALUE;
}
parameterWrapper->set(batPriorityParam);
if (newVal != batPriorityParam) {
parameterWrapper->set(params.batPriorityParam);
if (newVal != params.batPriorityParam) {
// This ensures that the BAT priority is updated at some point when an update of the PTME is
// allowed
updateContext.updateBatPrio = true;
@ -144,6 +145,23 @@ ReturnValue_t CcsdsIpCoreHandler::getParameter(uint8_t domainId, uint8_t uniqueI
}
}
return returnvalue::OK;
} else if (uniqueIdentifier == ParamId::POLL_THRESHOLD) {
uint8_t newVal = 0;
ReturnValue_t result = newValues->getElement(&newVal);
if (result != returnvalue::OK) {
return result;
}
if (newVal > static_cast<uint8_t>(AxiPtmeConfig::NEVER)) {
return HasParametersIF::INVALID_VALUE;
}
parameterWrapper->set(newVal);
if (newVal != params.pollThresholdParam) {
updateContext.updatePollThreshold = true;
if (mode == MODE_OFF) {
initPtmeUpdateAfterXCycles();
}
}
return returnvalue::OK;
}
return HasParametersIF::INVALID_IDENTIFIER_ID;
}
@ -161,24 +179,31 @@ ReturnValue_t CcsdsIpCoreHandler::executeAction(ActionId_t actionId, MessageQueu
switch (actionId) {
case ARBITRARY_RATE: {
uint32_t bitrate = 0;
SerializeAdapter::deSerialize(&bitrate, &data, &size, SerializeIF::Endianness::BIG);
result = ptmeConfig.setRate(bitrate);
result = SerializeAdapter::deSerialize(&bitrate, &data, &size, SerializeIF::Endianness::BIG);
if (result != returnvalue::OK) {
return result;
}
ptmeConfig.setRate(bitrate);
updateContext.updateClockRate = true;
if (mode == MODE_OFF) {
initPtmeUpdateAfterXCycles();
}
break;
}
case ENABLE_TX_CLK_MANIPULATOR: {
result = ptmeConfig.configTxManipulator(true);
ptmeConfig.configTxManipulator(true);
break;
}
case DISABLE_TX_CLK_MANIPULATOR: {
result = ptmeConfig.configTxManipulator(false);
ptmeConfig.configTxManipulator(false);
break;
}
case UPDATE_ON_RISING_EDGE: {
result = ptmeConfig.invertTxClock(false);
ptmeConfig.invertTxClock(false);
break;
}
case UPDATE_ON_FALLING_EDGE: {
result = ptmeConfig.invertTxClock(true);
ptmeConfig.invertTxClock(true);
break;
}
default:
@ -271,7 +296,7 @@ void CcsdsIpCoreHandler::enablePrioritySelectMode() { ptmeConfig.enableBatPriori
void CcsdsIpCoreHandler::disablePrioritySelectMode() { ptmeConfig.enableBatPriorityBit(false); }
void CcsdsIpCoreHandler::updateBatPriorityFromParam() {
if (batPriorityParam == 0) {
if (params.batPriorityParam == 0) {
disablePrioritySelectMode();
} else {
enablePrioritySelectMode();
@ -290,9 +315,17 @@ void CcsdsIpCoreHandler::performPtmeUpdateWhenApplicable() {
return;
}
if (updateContext.ptmeUpdateCycleCount >= 2) {
bool doResetPtme = false;
if (updateContext.updateBatPrio) {
updateBatPriorityFromParam();
updateContext.updateBatPrio = false;
doResetPtme = true;
}
if (updateContext.updatePollThreshold) {
ptmeConfig.setPollThreshold(
static_cast<AxiPtmeConfig::IdlePollThreshold>(params.pollThresholdParam));
updateContext.updatePollThreshold = false;
doResetPtme = true;
}
ReturnValue_t result = returnvalue::OK;
if (updateContext.updateClockRate) {
@ -312,10 +345,7 @@ void CcsdsIpCoreHandler::performPtmeUpdateWhenApplicable() {
sif::error << "CcsdsIpCoreHandler: Setting datarate failed" << std::endl;
}
updateContext.updateClockRate = false;
}
bool doResetPtme = true;
if (not updateContext.updateBatPrio and not updateContext.updateClockRate) {
doResetPtme = false;
doResetPtme = true;
}
finishPtmeUpdateAfterXCycles(doResetPtme);
return;

View File

@ -60,7 +60,7 @@ class CcsdsIpCoreHandler : public SystemObject,
public ReceivesParameterMessagesIF,
public HasActionsIF {
public:
enum ParamId : uint8_t { BAT_PRIORITY = 0 };
enum ParamId : uint8_t { BAT_PRIORITY = 0, POLL_THRESHOLD = 1 };
static const bool LINK_UP = true;
static const bool LINK_DOWN = false;
@ -156,12 +156,17 @@ class CcsdsIpCoreHandler : public SystemObject,
PtmeConfig& ptmeConfig;
PtmeGpios ptmeGpios;
// BAT priority bit on by default to enable priority selection mode for the PTME.
uint8_t batPriorityParam = 0;
struct Parameters {
// BAT priority bit on by default to enable priority selection mode for the PTME.
uint8_t batPriorityParam = 0;
uint8_t pollThresholdParam = static_cast<uint8_t>(AxiPtmeConfig::IdlePollThreshold::POLL_4);
} params;
struct UpdateContext {
bool updateBatPrio = false;
bool updateClockRate = false;
bool updatePollThreshold = false;
bool enableTransmitAfterPtmeUpdate = false;
uint8_t ptmeUpdateCycleCount = 0;
bool performPtmeUpdateAfterXCycles = false;

View File

@ -29,7 +29,7 @@ ReturnValue_t PersistentSingleTmStoreTask::performOperation(uint8_t opCode) {
TaskFactory::delayTask(10);
} else {
// TODO: Would be best to remove this, but not delaying here can lead to evil issues.
TaskFactory::delayTask(10);
TaskFactory::delayTask(2);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -13,7 +13,7 @@
#include <mission/acs/str/strHelpers.h>
#include <mission/acs/susMax1227Helpers.h>
#include <mission/com/syrlinksDefs.h>
#include <mission/controller/controllerdefinitions/ThermalControllerDefinitions.h>
#include <mission/controller/tcsDefs.h>
#include <mission/payload/payloadPcduDefinitions.h>
#include <mission/power/bpxBattDefs.h>
#include <mission/power/gsDefs.h>
@ -45,6 +45,48 @@ struct TempLimits {
float nopUpperLimit;
};
struct ThermalState {
uint8_t errorCounter;
bool heating;
uint32_t heaterStartTime;
};
struct HeaterState {
bool switchTransition;
HeaterHandler::SwitchState target;
uint8_t heaterSwitchControlCycles;
};
using HeaterSwitchStates = std::array<HeaterHandler::SwitchState, heater::NUMBER_OF_SWITCHES>;
enum ThermalComponents : uint8_t {
NONE = 0,
ACS_BOARD = 1,
MGT = 2,
RW = 3,
STR = 4,
IF_BOARD = 5,
TCS_BOARD = 6,
OBC = 7,
OBCIF_BOARD = 8,
SBAND_TRANSCEIVER = 9,
PCDUP60_BOARD = 10,
PCDUACU = 11,
PCDUPDU = 12,
PLPCDU_BOARD = 13,
PLOCMISSION_BOARD = 14,
PLOCPROCESSING_BOARD = 15,
DAC = 16,
CAMERA = 17,
DRO = 18,
X8 = 19,
HPA = 20,
TX = 21,
MPA = 22,
SCEX_BOARD = 23,
NUM_ENTRIES
};
class ThermalController : public ExtendedControllerBase {
public:
static const uint16_t INVALID_TEMPERATURE = 999;
@ -55,7 +97,19 @@ class ThermalController : public ExtendedControllerBase {
ReturnValue_t initialize() override;
protected:
void performThermalModuleCtrl();
struct HeaterContext {
public:
HeaterContext(heater::Switchers switchNr, heater::Switchers redundantSwitchNr,
const TempLimits& tempLimit)
: switchNr(switchNr), redSwitchNr(redundantSwitchNr), tempLimit(tempLimit) {}
bool doHeaterHandling = true;
heater::Switchers switchNr;
HeaterHandler::SwitchState switchState = HeaterHandler::SwitchState::OFF;
heater::Switchers redSwitchNr;
const TempLimits& tempLimit;
};
void performThermalModuleCtrl(const HeaterSwitchStates& heaterSwitchStates);
ReturnValue_t handleCommandMessage(CommandMessage* message) override;
void performControlOperation() override;
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
@ -67,16 +121,7 @@ class ThermalController : public ExtendedControllerBase {
uint32_t* msToReachTheMode) override;
private:
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::TCS_CONTROLLER;
static constexpr Event NO_VALID_SENSOR_TEMPERATURE = MAKE_EVENT(0, severity::MEDIUM);
static constexpr Event NO_HEALTHY_HEATER_AVAILABLE = MAKE_EVENT(1, severity::MEDIUM);
static constexpr Event SYRLINKS_OVERHEATING = MAKE_EVENT(2, severity::HIGH);
static constexpr Event PLOC_OVERHEATING = MAKE_EVENT(3, severity::HIGH);
static constexpr Event OBC_OVERHEATING = MAKE_EVENT(4, severity::HIGH);
static constexpr Event HPA_OVERHEATING = MAKE_EVENT(5, severity::HIGH);
static constexpr Event PLPCDU_OVERHEATING = MAKE_EVENT(6, severity::HIGH);
static const uint32_t DELAY = 500;
static const uint32_t INIT_DELAY = 1500;
static const uint32_t TEMP_OFFSET = 5;
@ -96,22 +141,22 @@ class ThermalController : public ExtendedControllerBase {
DeviceHandlerThermalSet imtqThermalSet;
// Temperature Sensors
MAX31865::PrimarySet max31865Set0;
MAX31865::PrimarySet max31865Set1;
MAX31865::PrimarySet max31865Set2;
MAX31865::PrimarySet max31865Set3;
MAX31865::PrimarySet max31865Set4;
MAX31865::PrimarySet max31865Set5;
MAX31865::PrimarySet max31865Set6;
MAX31865::PrimarySet max31865Set7;
MAX31865::PrimarySet max31865Set8;
MAX31865::PrimarySet max31865Set9;
MAX31865::PrimarySet max31865Set10;
MAX31865::PrimarySet max31865Set11;
MAX31865::PrimarySet max31865Set12;
MAX31865::PrimarySet max31865Set13;
MAX31865::PrimarySet max31865Set14;
MAX31865::PrimarySet max31865Set15;
MAX31865::PrimarySet maxSet0PlocHspd;
MAX31865::PrimarySet maxSet1PlocMissionBrd;
MAX31865::PrimarySet maxSet2PlCam;
MAX31865::PrimarySet maxSet3DacHspd;
MAX31865::PrimarySet maxSet4Str;
MAX31865::PrimarySet maxSet5Rw1MxMy;
MAX31865::PrimarySet maxSet6Dro;
MAX31865::PrimarySet maxSet7Scex;
MAX31865::PrimarySet maxSet8X8;
MAX31865::PrimarySet maxSet9Hpa;
MAX31865::PrimarySet maxSet10EbandTx;
MAX31865::PrimarySet maxSet11Mpa;
MAX31865::PrimarySet maxSet31865Set12;
MAX31865::PrimarySet maxSet13PlPcduHspd;
MAX31865::PrimarySet maxSet14TcsBrd;
MAX31865::PrimarySet maxSet15Imtq;
TMP1075::Tmp1075Dataset tmp1075SetTcs0;
TMP1075::Tmp1075Dataset tmp1075SetTcs1;
@ -191,18 +236,38 @@ class ThermalController : public ExtendedControllerBase {
TempLimits dacLimits = TempLimits(-65.0, -40.0, 113.0, 118.0, 150.0);
TempLimits cameraLimits = TempLimits(-40.0, -30.0, 60.0, 65.0, 85.0);
TempLimits droLimits = TempLimits(-40.0, -30.0, 75.0, 80.0, 90.0);
TempLimits x8Limits = TempLimits(-40.0, -30.0, -75.0, 80.0, 90.0);
TempLimits hpaLimits = TempLimits(-40.0, -30.0, -75.0, 80.0, 90.0);
TempLimits txLimits = TempLimits(-40.0, -30.0, -75.0, 80.0, 90.0);
TempLimits mpaLimits = TempLimits(-40.0, -30.0, -75.0, 80.0, 90.0);
TempLimits x8Limits = TempLimits(-40.0, -30.0, 75.0, 80.0, 90.0);
TempLimits hpaLimits = TempLimits(-40.0, -30.0, 75.0, 80.0, 90.0);
TempLimits txLimits = TempLimits(-40.0, -30.0, 75.0, 80.0, 90.0);
TempLimits mpaLimits = TempLimits(-40.0, -30.0, 75.0, 80.0, 90.0);
TempLimits scexBoardLimits = TempLimits(-60.0, -40.0, 80.0, 85.0, 150.0);
double sensorTemp = INVALID_TEMPERATURE;
ThermalComponents thermalComponent = NONE;
bool redSwitchNrInUse = false;
MessageQueueId_t camId = MessageQueueIF::NO_QUEUE;
bool componentAboveCutOffLimit = false;
bool componentAboveUpperLimit = false;
Event overHeatEventToTrigger;
bool eBandTooHotFlag = false;
bool camTooHotOneShotFlag = false;
bool scexTooHotFlag = false;
bool plocTooHotFlag = false;
bool pcduSystemTooHotFlag = false;
bool syrlinksTooHotFlag = false;
bool obcTooHotFlag = false;
bool strTooHotFlag = false;
bool rwTooHotFlag = false;
// Initial delay to make sure all pool variables have been initialized their owners
Countdown initialCountdown = Countdown(DELAY);
bool transitionToOff = false;
uint32_t transitionToOffCycles = 0;
uint32_t cycles = 0;
std::array<ThermalState, 30> thermalStates{};
std::array<HeaterState, 7> heaterStates{};
// Initial delay to make sure all pool variables have been initialized their owners.
// Also, wait for system initialization to complete.
Countdown initialCountdown = Countdown(INIT_DELAY);
#if OBSW_THREAD_TRACING == 1
uint32_t opCounter = 0;
@ -221,14 +286,18 @@ class ThermalController : public ExtendedControllerBase {
static constexpr dur_millis_t MUTEX_TIMEOUT = 50;
void startTransition(Mode_t mode, Submode_t submode) override;
void resetSensorsArray();
void copySensors();
void copySus();
void copyDevices();
void ctrlComponentTemperature(heater::Switchers switchNr, heater::Switchers redSwitchNr,
TempLimits& tempLimit);
void ctrlHeater(heater::Switchers switchNr, heater::Switchers redSwitchNr, TempLimits& tempLimit);
void ctrlComponentTemperature(HeaterContext& heaterContext);
void checkLimitsAndCtrlHeater(HeaterContext& heaterContext);
bool heaterCtrlCheckUpperLimits(HeaterContext& heaterContext);
void heaterCtrlTempTooHighHandler(HeaterContext& heaterContext, const char* whatLimit);
bool chooseHeater(heater::Switchers& switchNr, heater::Switchers redSwitchNr);
bool selectAndReadSensorTemp();
@ -255,6 +324,11 @@ class ThermalController : public ExtendedControllerBase {
void ctrlTx();
void ctrlMpa();
void ctrlScexBoard();
void heaterTransitionControl(const HeaterSwitchStates& currentHeaterStates);
void setMode(Mode_t mode);
uint32_t tempFloatToU32() const;
bool tooHotHandler(object_id_t object, bool& oneShotFlag);
void tooHotHandlerWhichClearsOneShotFlag(object_id_t object, bool& oneShotFlag);
};
#endif /* MISSION_CONTROLLER_THERMALCONTROLLER_H_ */

View File

@ -5,9 +5,19 @@
#include <fsfw/datapoollocal/StaticLocalDataSet.h>
#include "devices/heaterSwitcherList.h"
#include "eive/eventSubsystemIds.h"
namespace tcsCtrl {
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::TCS_CONTROLLER;
static constexpr Event NO_VALID_SENSOR_TEMPERATURE = MAKE_EVENT(0, severity::MEDIUM);
static constexpr Event NO_HEALTHY_HEATER_AVAILABLE = MAKE_EVENT(1, severity::MEDIUM);
static constexpr Event SYRLINKS_OVERHEATING = MAKE_EVENT(2, severity::HIGH);
static constexpr Event OBC_OVERHEATING = MAKE_EVENT(4, severity::HIGH);
static constexpr Event CAMERA_OVERHEATING = MAKE_EVENT(5, severity::HIGH);
static constexpr Event PCDU_SYSTEM_OVERHEATING = MAKE_EVENT(6, severity::HIGH);
static constexpr Event HEATER_NOT_OFF_FOR_OFF_MODE = MAKE_EVENT(7, severity::MEDIUM);
enum SetId : uint32_t {
SENSOR_TEMPERATURES = 0,
DEVICE_TEMPERATURES = 1,
@ -93,34 +103,33 @@ static const uint8_t ENTRIES_SUS_TEMPERATURE_SET = 12;
*/
class SensorTemperatures : public StaticLocalDataSet<ENTRIES_SENSOR_TEMPERATURE_SET> {
public:
SensorTemperatures(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, SENSOR_TEMPERATURES) {}
explicit SensorTemperatures(HasLocalDataPoolIF* owner)
: StaticLocalDataSet(owner, SENSOR_TEMPERATURES) {}
SensorTemperatures(object_id_t objectId)
explicit SensorTemperatures(object_id_t objectId)
: StaticLocalDataSet(sid_t(objectId, SENSOR_TEMPERATURES)) {}
lp_var_t<float> sensor_ploc_heatspreader =
lp_var_t<float> plocHeatspreader =
lp_var_t<float>(sid.objectId, PoolIds::SENSOR_PLOC_HEATSPREADER, this);
lp_var_t<float> sensor_ploc_missionboard =
lp_var_t<float> plocMissionboard =
lp_var_t<float>(sid.objectId, PoolIds::SENSOR_PLOC_MISSIONBOARD, this);
lp_var_t<float> sensor_4k_camera = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_4K_CAMERA, this);
lp_var_t<float> sensor_dac_heatspreader =
lp_var_t<float> payload4kCamera = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_4K_CAMERA, this);
lp_var_t<float> dacHeatspreader =
lp_var_t<float>(sid.objectId, PoolIds::SENSOR_DAC_HEATSPREADER, this);
lp_var_t<float> sensor_startracker =
lp_var_t<float>(sid.objectId, PoolIds::SENSOR_STARTRACKER, this);
lp_var_t<float> sensor_rw1 = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_RW1, this);
lp_var_t<float> sensor_scex = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_SCEX, this);
lp_var_t<float> sensor_tx_modul = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_TX_MODUL, this);
lp_var_t<float> startracker = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_STARTRACKER, this);
lp_var_t<float> rw1 = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_RW1, this);
lp_var_t<float> scex = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_SCEX, this);
lp_var_t<float> eBandTx = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_TX_MODUL, this);
// E-Band module
lp_var_t<float> sensor_dro = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_DRO, this);
lp_var_t<float> sensor_mpa = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_MPA, this);
lp_var_t<float> sensor_x8 = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_X8, this);
lp_var_t<float> sensor_hpa = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_HPA, this);
lp_var_t<float> sensor_acu = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_ACU, this);
lp_var_t<float> sensor_plpcdu_heatspreader =
lp_var_t<float> dro = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_DRO, this);
lp_var_t<float> mpa = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_MPA, this);
lp_var_t<float> x8 = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_X8, this);
lp_var_t<float> hpa = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_HPA, this);
lp_var_t<float> acu = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_ACU, this);
lp_var_t<float> plpcduHeatspreader =
lp_var_t<float>(sid.objectId, PoolIds::SENSOR_PLPCDU_HEATSPREADER, this);
lp_var_t<float> sensor_tcs_board = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_TCS_BOARD, this);
lp_var_t<float> sensor_magnettorquer =
lp_var_t<float>(sid.objectId, PoolIds::SENSOR_MAGNETTORQUER, this);
lp_var_t<float> tcsBoard = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_TCS_BOARD, this);
lp_var_t<float> mgt = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_MAGNETTORQUER, this);
lp_var_t<float> tmp1075Tcs0 = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_TMP1075_TCS_0, this);
lp_var_t<float> tmp1075Tcs1 = lp_var_t<float>(sid.objectId, PoolIds::SENSOR_TMP1075_TCS_1, this);
lp_var_t<float> tmp1075PlPcdu0 =
@ -137,9 +146,10 @@ class SensorTemperatures : public StaticLocalDataSet<ENTRIES_SENSOR_TEMPERATURE_
*/
class DeviceTemperatures : public StaticLocalDataSet<ENTRIES_DEVICE_TEMPERATURE_SET> {
public:
DeviceTemperatures(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, DEVICE_TEMPERATURES) {}
explicit DeviceTemperatures(HasLocalDataPoolIF* owner)
: StaticLocalDataSet(owner, DEVICE_TEMPERATURES) {}
DeviceTemperatures(object_id_t objectId)
explicit DeviceTemperatures(object_id_t objectId)
: StaticLocalDataSet(sid_t(objectId, DEVICE_TEMPERATURES)) {}
lp_var_t<float> q7s = lp_var_t<float>(sid.objectId, PoolIds::TEMP_Q7S, this);
@ -178,9 +188,11 @@ class DeviceTemperatures : public StaticLocalDataSet<ENTRIES_DEVICE_TEMPERATURE_
*/
class SusTemperatures : public StaticLocalDataSet<ENTRIES_SUS_TEMPERATURE_SET> {
public:
SusTemperatures(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, SUS_TEMPERATURES) {}
explicit SusTemperatures(HasLocalDataPoolIF* owner)
: StaticLocalDataSet(owner, SUS_TEMPERATURES) {}
SusTemperatures(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, SUS_TEMPERATURES)) {}
explicit SusTemperatures(object_id_t objectId)
: StaticLocalDataSet(sid_t(objectId, SUS_TEMPERATURES)) {}
lp_var_t<float> sus_0_n_loc_xfyfzm_pt_xf =
lp_var_t<float>(sid.objectId, PoolIds::SUS_0_N_LOC_XFYFZM_PT_XF, this);

View File

@ -295,7 +295,7 @@ void ObjectFactory::createGenericHeaterComponents(GpioIF& gpioIF, PowerSwitchIF&
{new HealthDevice(objects::HEATER_7_SYRLINKS, MessageQueueIF::NO_QUEUE), gpioIds::HEATER_7},
}});
heaterHandler = new HeaterHandler(objects::HEATER_HANDLER, &gpioIF, helper, &pwrSwitcher,
pcdu::Switches::PDU2_CH3_TCS_BOARD_HEATER_IN_8V);
power::Switches::PDU2_CH3_TCS_BOARD_HEATER_IN_8V);
heaterHandler->connectModeTreeParent(satsystem::tcs::SUBSYSTEM);
}
@ -359,13 +359,17 @@ void ObjectFactory::createAcsBoardAssy(PowerSwitchIF& pwrSwitcher,
}
}
gpsCtrl->connectModeTreeParent(*acsAss);
auto* gps0HealthDev = new HealthDevice(objects::GPS_0_HEALTH_DEV, acsAss->getCommandQueue());
auto* gps1HealthDev = new HealthDevice(objects::GPS_1_HEALTH_DEV, acsAss->getCommandQueue());
acsAss->registerChild(objects::GPS_0_HEALTH_DEV, gps0HealthDev->getCommandQueue());
acsAss->registerChild(objects::GPS_1_HEALTH_DEV, gps1HealthDev->getCommandQueue());
acsAss->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM);
}
TcsBoardAssembly* ObjectFactory::createTcsBoardAssy(PowerSwitchIF& pwrSwitcher) {
TcsBoardHelper helper(RTD_INFOS);
auto* tcsBoardAss = new TcsBoardAssembly(objects::TCS_BOARD_ASS, &pwrSwitcher,
pcdu::Switches::PDU1_CH0_TCS_BOARD_3V3, helper);
power::Switches::PDU1_CH0_TCS_BOARD_3V3, helper);
tcsBoardAss->connectModeTreeParent(satsystem::tcs::SUBSYSTEM);
return tcsBoardAss;
}

View File

@ -2,6 +2,7 @@
#define MISSION_CORE_GENERICFACTORY_H_
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
#include <fsfw/devicehandlers/HealthDevice.h>
#include <mission/memory/SdCardMountedIF.h>
#include <mission/persistentTmStoreDefs.h>
#include <mission/tcs/Max31865Definitions.h>

View File

@ -28,25 +28,35 @@ ReturnValue_t PcduHandler::performOperation(uint8_t counter) {
if (counter == DeviceHandlerIF::PERFORM_OPERATION) {
readCommandQueue();
}
uint8_t switchState = 0;
uint8_t switchState5V = 0;
uint8_t switchState3V3 = 0;
{
PoolReadGuard pg(&p60CoreHk.outputEnables);
if (pg.getReadResult() == returnvalue::OK) {
switchState = p60CoreHk.outputEnables.value[10];
switchState5V = p60CoreHk.outputEnables.value[P60Dock::hk::STACK_5V];
switchState3V3 = p60CoreHk.outputEnables.value[P60Dock::hk::STACK_3V3];
} else {
return returnvalue::OK;
}
}
{
PoolReadGuard pg(&switcherSet.p60Dock5VStack);
PoolReadGuard pg(&switcherSet);
if (pg.getReadResult() == returnvalue::OK) {
if (switcherSet.p60Dock5VStack.value != switchState) {
triggerEvent(power::SWITCH_HAS_CHANGED, switchState, pcdu::Switches::P60_DOCK_5V_STACK);
if (switcherSet.p60Dock5VStack.value != switchState5V) {
triggerEvent(power::SWITCH_HAS_CHANGED, switchState5V, power::Switches::P60_DOCK_5V_STACK);
MutexGuard mg(pwrLock, LOCK_TYPE, LOCK_TIMEOUT, LOCK_CTX);
switchStates[pcdu::P60_DOCK_5V_STACK] = switchState;
switchStates[power::P60_DOCK_5V_STACK] = switchState5V;
}
if (switcherSet.p60Dock3V3Stack.value != switchState3V3) {
triggerEvent(power::SWITCH_HAS_CHANGED, switchState3V3,
power::Switches::P60_DOCK_3V3_STACK);
MutexGuard mg(pwrLock, LOCK_TYPE, LOCK_TIMEOUT, LOCK_CTX);
switchStates[power::P60_DOCK_3V3_STACK] = switchState3V3;
}
switcherSet.p60Dock5VStack.setValid(true);
switcherSet.p60Dock5VStack.value = switchState;
switcherSet.p60Dock5VStack.value = switchState5V;
switcherSet.p60Dock3V3Stack.setValid(true);
switcherSet.p60Dock3V3Stack.value = switchState3V3;
}
}
return returnvalue::OK;
@ -103,7 +113,7 @@ ReturnValue_t PcduHandler::initialize() {
void PcduHandler::initializeSwitchStates() {
using namespace pcdu;
try {
for (uint8_t idx = 0; idx < NUMBER_OF_SWITCHES; idx++) {
for (uint8_t idx = 0; idx < power::NUMBER_OF_SWITCHES; idx++) {
if (idx < PDU::CHANNELS_LEN) {
switchStates[idx] = INIT_SWITCHES_PDU1.at(idx);
} else if (idx < PDU::CHANNELS_LEN * 2) {
@ -181,22 +191,23 @@ void PcduHandler::updatePdu2SwitchStates() {
}
switcherSet.pdu2Switches.setValid(true);
MutexGuard mg(pwrLock, LOCK_TYPE, LOCK_TIMEOUT, LOCK_CTX);
checkAndUpdatePduSwitch(pdu, Switches::PDU2_CH0_Q7S, pdu2CoreHk.outputEnables[Channels::Q7S]);
checkAndUpdatePduSwitch(pdu, power::PDU2_CH0_Q7S, pdu2CoreHk.outputEnables[Channels::Q7S]);
checkAndUpdatePduSwitch(pdu, Switches::PDU2_CH1_PL_PCDU_BATT_0_14V8,
checkAndUpdatePduSwitch(pdu, power::Switches::PDU2_CH1_PL_PCDU_BATT_0_14V8,
pdu2CoreHk.outputEnables[Channels::PAYLOAD_PCDU_CH1]);
checkAndUpdatePduSwitch(pdu, Switches::PDU2_CH2_RW_5V, pdu2CoreHk.outputEnables[Channels::RW]);
checkAndUpdatePduSwitch(pdu, Switches::PDU2_CH3_TCS_BOARD_HEATER_IN_8V,
checkAndUpdatePduSwitch(pdu, power::Switches::PDU2_CH2_RW_5V,
pdu2CoreHk.outputEnables[Channels::RW]);
checkAndUpdatePduSwitch(pdu, power::Switches::PDU2_CH3_TCS_BOARD_HEATER_IN_8V,
pdu2CoreHk.outputEnables[Channels::TCS_HEATER_IN]);
checkAndUpdatePduSwitch(pdu, Switches::PDU2_CH4_SUS_REDUNDANT_3V3,
checkAndUpdatePduSwitch(pdu, power::Switches::PDU2_CH4_SUS_REDUNDANT_3V3,
pdu2CoreHk.outputEnables[Channels::SUS_REDUNDANT]);
checkAndUpdatePduSwitch(pdu, Switches::PDU2_CH5_DEPLOYMENT_MECHANISM_8V,
checkAndUpdatePduSwitch(pdu, power::Switches::PDU2_CH5_DEPLOYMENT_MECHANISM_8V,
pdu2CoreHk.outputEnables[Channels::DEPY_MECHANISM]);
checkAndUpdatePduSwitch(pdu, Switches::PDU2_CH6_PL_PCDU_BATT_1_14V8,
checkAndUpdatePduSwitch(pdu, power::Switches::PDU2_CH6_PL_PCDU_BATT_1_14V8,
pdu2CoreHk.outputEnables[Channels::PAYLOAD_PCDU_CH6]);
checkAndUpdatePduSwitch(pdu, Switches::PDU2_CH7_ACS_BOARD_SIDE_B_3V3,
checkAndUpdatePduSwitch(pdu, power::Switches::PDU2_CH7_ACS_BOARD_SIDE_B_3V3,
pdu2CoreHk.outputEnables[Channels::ACS_B_SIDE]);
checkAndUpdatePduSwitch(pdu, Switches::PDU2_CH8_PAYLOAD_CAMERA,
checkAndUpdatePduSwitch(pdu, power::Switches::PDU2_CH8_PAYLOAD_CAMERA,
pdu2CoreHk.outputEnables[Channels::PAYLOAD_CAMERA]);
if (firstSwitchInfoPdu2) {
firstSwitchInfoPdu2 = false;
@ -218,23 +229,23 @@ void PcduHandler::updatePdu1SwitchStates() {
}
switcherSet.pdu1Switches.setValid(true);
MutexGuard mg(pwrLock, LOCK_TYPE, LOCK_TIMEOUT, LOCK_CTX);
checkAndUpdatePduSwitch(pdu, Switches::PDU1_CH0_TCS_BOARD_3V3,
checkAndUpdatePduSwitch(pdu, power::Switches::PDU1_CH0_TCS_BOARD_3V3,
pdu1CoreHk.outputEnables[Channels::TCS_BOARD_3V3]);
checkAndUpdatePduSwitch(pdu, Switches::PDU1_CH1_SYRLINKS_12V,
checkAndUpdatePduSwitch(pdu, power::Switches::PDU1_CH1_SYRLINKS_12V,
pdu1CoreHk.outputEnables[Channels::SYRLINKS]);
checkAndUpdatePduSwitch(pdu, Switches::PDU1_CH2_STAR_TRACKER_5V,
checkAndUpdatePduSwitch(pdu, power::Switches::PDU1_CH2_STAR_TRACKER_5V,
pdu1CoreHk.outputEnables[Channels::STR]);
checkAndUpdatePduSwitch(pdu, Switches::PDU1_CH3_MGT_5V,
checkAndUpdatePduSwitch(pdu, power::Switches::PDU1_CH3_MGT_5V,
pdu1CoreHk.outputEnables[Channels::MGT]);
checkAndUpdatePduSwitch(pdu, Switches::PDU1_CH4_SUS_NOMINAL_3V3,
checkAndUpdatePduSwitch(pdu, power::Switches::PDU1_CH4_SUS_NOMINAL_3V3,
pdu1CoreHk.outputEnables[Channels::SUS_NOMINAL]);
checkAndUpdatePduSwitch(pdu, Switches::PDU1_CH5_SOLAR_CELL_EXP_5V,
checkAndUpdatePduSwitch(pdu, power::Switches::PDU1_CH5_SOLAR_CELL_EXP_5V,
pdu1CoreHk.outputEnables[Channels::SOL_CELL_EXPERIMENT]);
checkAndUpdatePduSwitch(pdu, Switches::PDU1_CH6_PLOC_12V,
checkAndUpdatePduSwitch(pdu, power::Switches::PDU1_CH6_PLOC_12V,
pdu1CoreHk.outputEnables[Channels::PLOC]);
checkAndUpdatePduSwitch(pdu, Switches::PDU1_CH7_ACS_A_SIDE_3V3,
checkAndUpdatePduSwitch(pdu, power::Switches::PDU1_CH7_ACS_A_SIDE_3V3,
pdu1CoreHk.outputEnables[Channels::ACS_A_SIDE]);
checkAndUpdatePduSwitch(pdu, Switches::PDU1_CH8_UNOCCUPIED,
checkAndUpdatePduSwitch(pdu, power::Switches::PDU1_CH8_UNOCCUPIED,
pdu1CoreHk.outputEnables[Channels::UNUSED]);
if (firstSwitchInfoPdu1) {
firstSwitchInfoPdu1 = false;
@ -255,103 +266,108 @@ ReturnValue_t PcduHandler::sendSwitchCommand(uint8_t switchNr, ReturnValue_t onO
GomspaceDeviceHandler* module = nullptr;
switch (switchNr) {
case pcdu::PDU1_CH0_TCS_BOARD_3V3: {
case power::PDU1_CH0_TCS_BOARD_3V3: {
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_TCS_BOARD_3V3;
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
break;
}
case pcdu::PDU1_CH1_SYRLINKS_12V: {
case power::PDU1_CH1_SYRLINKS_12V: {
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_SYRLINKS;
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
break;
}
case pcdu::PDU1_CH2_STAR_TRACKER_5V: {
case power::PDU1_CH2_STAR_TRACKER_5V: {
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_STAR_TRACKER;
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
break;
}
case pcdu::PDU1_CH3_MGT_5V: {
case power::PDU1_CH3_MGT_5V: {
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_MGT;
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
break;
}
case pcdu::PDU1_CH4_SUS_NOMINAL_3V3: {
case power::PDU1_CH4_SUS_NOMINAL_3V3: {
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_SUS_NOMINAL;
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
break;
}
case pcdu::PDU1_CH5_SOLAR_CELL_EXP_5V: {
case power::PDU1_CH5_SOLAR_CELL_EXP_5V: {
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_SOLAR_CELL_EXP;
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
break;
}
case pcdu::PDU1_CH6_PLOC_12V: {
case power::PDU1_CH6_PLOC_12V: {
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_PLOC;
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
break;
}
case pcdu::PDU1_CH7_ACS_A_SIDE_3V3: {
case power::PDU1_CH7_ACS_A_SIDE_3V3: {
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_ACS_BOARD_SIDE_A;
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
break;
}
case pcdu::PDU1_CH8_UNOCCUPIED: {
case power::PDU1_CH8_UNOCCUPIED: {
memoryAddress = PDU1::CONFIG_ADDRESS_OUT_EN_CHANNEL8;
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU1_HANDLER);
break;
}
// This is a dangerous command. Reject/Igore it for now
case pcdu::PDU2_CH0_Q7S: {
case power::PDU2_CH0_Q7S: {
return returnvalue::FAILED;
// memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_Q7S;
// pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
// break;
}
case pcdu::PDU2_CH1_PL_PCDU_BATT_0_14V8: {
case power::PDU2_CH1_PL_PCDU_BATT_0_14V8: {
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_PAYLOAD_PCDU_CH1;
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
break;
}
case pcdu::PDU2_CH2_RW_5V: {
case power::PDU2_CH2_RW_5V: {
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_RW;
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
break;
}
case pcdu::PDU2_CH3_TCS_BOARD_HEATER_IN_8V: {
case power::PDU2_CH3_TCS_BOARD_HEATER_IN_8V: {
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_TCS_BOARD_HEATER_IN;
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
break;
}
case pcdu::PDU2_CH4_SUS_REDUNDANT_3V3: {
case power::PDU2_CH4_SUS_REDUNDANT_3V3: {
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_SUS_REDUNDANT;
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
break;
}
case pcdu::PDU2_CH5_DEPLOYMENT_MECHANISM_8V: {
case power::PDU2_CH5_DEPLOYMENT_MECHANISM_8V: {
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_DEPLOYMENT_MECHANISM;
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
break;
}
case pcdu::PDU2_CH6_PL_PCDU_BATT_1_14V8: {
case power::PDU2_CH6_PL_PCDU_BATT_1_14V8: {
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_PAYLOAD_PCDU_CH6;
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
break;
}
case pcdu::PDU2_CH7_ACS_BOARD_SIDE_B_3V3: {
case power::PDU2_CH7_ACS_BOARD_SIDE_B_3V3: {
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_ACS_BOARD_SIDE_B;
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
break;
}
case pcdu::PDU2_CH8_PAYLOAD_CAMERA: {
case power::PDU2_CH8_PAYLOAD_CAMERA: {
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_PAYLOAD_CAMERA;
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
break;
}
case pcdu::P60_DOCK_5V_STACK: {
case power::P60_DOCK_5V_STACK: {
memoryAddress = P60Dock::CONFIG_ADDRESS_OUT_EN_5V_STACK;
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::P60DOCK_HANDLER);
break;
}
case power::P60_DOCK_3V3_STACK: {
memoryAddress = P60Dock::CONFIG_ADDRESS_OUT_EN_3V3_STACK;
module = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::P60DOCK_HANDLER);
break;
}
default: {
sif::error << "PCDUHandler::sendSwitchCommand: Invalid switch number " << std::endl;
@ -399,7 +415,7 @@ ReturnValue_t PcduHandler::sendSwitchCommand(uint8_t switchNr, ReturnValue_t onO
ReturnValue_t PcduHandler::sendFuseOnCommand(uint8_t fuseNr) { return returnvalue::OK; }
ReturnValue_t PcduHandler::getSwitchState(uint8_t switchNr) const {
if (switchNr >= pcdu::NUMBER_OF_SWITCHES) {
if (switchNr >= power::NUMBER_OF_SWITCHES) {
sif::debug << "PCDUHandler::getSwitchState: Invalid switch number" << std::endl;
return returnvalue::FAILED;
}
@ -429,7 +445,8 @@ ReturnValue_t PcduHandler::initializeLocalDataPool(localpool::DataPool& localDat
using namespace pcdu;
localDataPoolMap.emplace(PoolIds::PDU1_SWITCHES, &pdu1Switches);
localDataPoolMap.emplace(PoolIds::PDU2_SWITCHES, &pdu2Switches);
localDataPoolMap.emplace(PoolIds::P60DOCK_SWITCHES, &p60Dock5VSwitch);
localDataPoolMap.emplace(PoolIds::P60DOCK_5V, &p60Dock5VSwitch);
localDataPoolMap.emplace(PoolIds::P60DOCK_3V3, &p60Dock3V3Switch);
poolManager.subscribeForDiagPeriodicPacket(
subdp::DiagnosticsHkPeriodicParams(switcherSet.getSid(), false, 5.0));
return returnvalue::OK;
@ -459,7 +476,7 @@ LocalPoolDataSetBase* PcduHandler::getDataSetHandle(sid_t sid) {
}
}
void PcduHandler::checkAndUpdatePduSwitch(GOMSPACE::Pdu pdu, pcdu::Switches switchIdx,
void PcduHandler::checkAndUpdatePduSwitch(GOMSPACE::Pdu pdu, power::Switches switchIdx,
uint8_t setValue) {
using namespace pcdu;
if (switchStates[switchIdx] != setValue) {

View File

@ -80,6 +80,7 @@ class PcduHandler : public PowerSwitchIF,
PoolEntry<uint8_t> pdu2Switches =
PoolEntry<uint8_t>(pcdu::INIT_SWITCHES_PDU2.data(), pcdu::INIT_SWITCHES_PDU2.size());
PoolEntry<uint8_t> p60Dock5VSwitch = PoolEntry<uint8_t>();
PoolEntry<uint8_t> p60Dock3V3Switch = PoolEntry<uint8_t>();
/** The timeStamp of the current pdu2HkTableDataset */
CCSDSTime::CDS_short timeStampPdu2HkDataset;
@ -88,7 +89,7 @@ class PcduHandler : public PowerSwitchIF,
CCSDSTime::CDS_short timeStampPdu1HkDataset;
uint8_t SWITCH_STATE_UNKNOWN = 2;
uint8_t switchStates[pcdu::NUMBER_OF_SWITCHES];
uint8_t switchStates[power::NUMBER_OF_SWITCHES];
/**
* Pointer to the IPCStore.
* This caches the pointer received from the objectManager in the constructor.
@ -137,7 +138,7 @@ class PcduHandler : public PowerSwitchIF,
*/
void updateHkTableDataset(store_address_t storeId, LocalPoolDataSetBase* dataset,
CCSDSTime::CDS_short* datasetTimeStamp);
void checkAndUpdatePduSwitch(GOMSPACE::Pdu pdu, pcdu::Switches switchIdx, uint8_t setValue);
void checkAndUpdatePduSwitch(GOMSPACE::Pdu pdu, power::Switches switchIdx, uint8_t setValue);
};
#endif /* MISSION_POWER_PCDUHANDLER_H_ */

View File

@ -3,11 +3,39 @@
#include <fsfw/events/Event.h>
#include <fsfw/modes/ModeMessage.h>
#include <fsfw/power/definitions.h>
#include "eive/eventSubsystemIds.h"
namespace power {
/* Switches are uint8_t datatype and go from 0 to 255 */
enum Switches : power::Switch_t {
PDU1_CH0_TCS_BOARD_3V3,
PDU1_CH1_SYRLINKS_12V,
PDU1_CH2_STAR_TRACKER_5V,
PDU1_CH3_MGT_5V,
PDU1_CH4_SUS_NOMINAL_3V3,
PDU1_CH5_SOLAR_CELL_EXP_5V,
PDU1_CH6_PLOC_12V,
PDU1_CH7_ACS_A_SIDE_3V3,
PDU1_CH8_UNOCCUPIED,
PDU2_CH0_Q7S,
PDU2_CH1_PL_PCDU_BATT_0_14V8,
PDU2_CH2_RW_5V,
PDU2_CH3_TCS_BOARD_HEATER_IN_8V,
PDU2_CH4_SUS_REDUNDANT_3V3,
PDU2_CH5_DEPLOYMENT_MECHANISM_8V,
PDU2_CH6_PL_PCDU_BATT_1_14V8,
PDU2_CH7_ACS_BOARD_SIDE_B_3V3,
PDU2_CH8_PAYLOAD_CAMERA,
P60_DOCK_5V_STACK,
P60_DOCK_3V3_STACK,
NUMBER_OF_SWITCHES
};
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PCDU_HANDLER;
//! [EXPORT] : [COMMENT] Indicates that a FSFW object requested setting a switch
//! P1: 1 if on was requested, 0 for off | P2: Switch Index

View File

@ -11,6 +11,7 @@
#include "devices/powerSwitcherList.h"
#include "fsfw/platform.h"
#include "mission/power/defs.h"
namespace GOMSPACE {
@ -108,6 +109,7 @@ enum class SetIds : uint32_t { CORE = 1, AUX = 2, CONFIG = 3 };
namespace P60Dock {
static const uint16_t CONFIG_ADDRESS_OUT_EN_3V3_STACK = 0x71;
static const uint16_t CONFIG_ADDRESS_OUT_EN_5V_STACK = 0x72;
namespace pool {
@ -713,33 +715,7 @@ class AuxHk : public StaticLocalDataSet<12> {
namespace pcdu {
enum PoolIds : uint32_t { PDU1_SWITCHES, PDU2_SWITCHES, P60DOCK_SWITCHES };
/* Switches are uint8_t datatype and go from 0 to 255 */
enum Switches : power::Switch_t {
PDU1_CH0_TCS_BOARD_3V3,
PDU1_CH1_SYRLINKS_12V,
PDU1_CH2_STAR_TRACKER_5V,
PDU1_CH3_MGT_5V,
PDU1_CH4_SUS_NOMINAL_3V3,
PDU1_CH5_SOLAR_CELL_EXP_5V,
PDU1_CH6_PLOC_12V,
PDU1_CH7_ACS_A_SIDE_3V3,
PDU1_CH8_UNOCCUPIED,
PDU2_CH0_Q7S,
PDU2_CH1_PL_PCDU_BATT_0_14V8,
PDU2_CH2_RW_5V,
PDU2_CH3_TCS_BOARD_HEATER_IN_8V,
PDU2_CH4_SUS_REDUNDANT_3V3,
PDU2_CH5_DEPLOYMENT_MECHANISM_8V,
PDU2_CH6_PL_PCDU_BATT_1_14V8,
PDU2_CH7_ACS_BOARD_SIDE_B_3V3,
PDU2_CH8_PAYLOAD_CAMERA,
P60_DOCK_5V_STACK,
NUMBER_OF_SWITCHES
};
enum PoolIds : uint32_t { PDU1_SWITCHES, PDU2_SWITCHES, P60DOCK_5V, P60DOCK_3V3 };
static const uint8_t ON = 1;
static const uint8_t OFF = 0;
@ -760,7 +736,7 @@ const std::array<uint8_t, PDU::CHANNELS_LEN> INIT_SWITCHES_PDU2 = {ON, OFF, OFF
static constexpr uint32_t SWITCHER_SET_ID = 0;
class SwitcherStates : public StaticLocalDataSet<NUMBER_OF_SWITCHES> {
class SwitcherStates : public StaticLocalDataSet<power::NUMBER_OF_SWITCHES> {
public:
SwitcherStates(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, SWITCHER_SET_ID) {}
@ -770,7 +746,8 @@ class SwitcherStates : public StaticLocalDataSet<NUMBER_OF_SWITCHES> {
lp_vec_t<uint8_t, PDU::CHANNELS_LEN>(sid.objectId, PDU1_SWITCHES, this);
lp_vec_t<uint8_t, PDU::CHANNELS_LEN> pdu2Switches =
lp_vec_t<uint8_t, PDU::CHANNELS_LEN>(sid.objectId, PDU2_SWITCHES, this);
lp_var_t<uint8_t> p60Dock5VStack = lp_var_t<uint8_t>(sid.objectId, P60DOCK_SWITCHES, this);
lp_var_t<uint8_t> p60Dock5VStack = lp_var_t<uint8_t>(sid.objectId, P60DOCK_5V, this);
lp_var_t<uint8_t> p60Dock3V3Stack = lp_var_t<uint8_t>(sid.objectId, P60DOCK_3V3, this);
};
} // namespace pcdu

View File

@ -77,16 +77,14 @@ ReturnValue_t AcsBoardAssembly::checkChildrenStateOn(Mode_t wantedMode, Submode_
if (wantedSubmode == A_SIDE) {
if ((helper.gyro0SideAMode != wantedMode and helper.gyro1SideAMode != wantedMode) or
(helper.mgm0SideAMode != wantedMode and helper.mgm1SideAMode != wantedMode) or
(helper.gpsMode != MODE_ON) or
(healthHelper.healthTable->getHealth(helper.healthDevGps0) == FAULTY)) {
(helper.gpsMode != MODE_ON) or gps0HealthDevFaulty()) {
return NOT_ENOUGH_CHILDREN_IN_CORRECT_STATE;
}
return returnvalue::OK;
} else if (wantedSubmode == B_SIDE) {
if ((helper.gyro2SideBMode != wantedMode and helper.gyro3SideBMode != wantedMode) or
(helper.mgm2SideBMode != wantedMode and helper.mgm3SideBMode != wantedMode) or
(helper.gpsMode != MODE_ON) or
(healthHelper.healthTable->getHealth(helper.healthDevGps1) == FAULTY)) {
(helper.gpsMode != MODE_ON) or gps1HealthDevFaulty()) {
return NOT_ENOUGH_CHILDREN_IN_CORRECT_STATE;
}
return returnvalue::OK;
@ -121,7 +119,8 @@ ReturnValue_t AcsBoardAssembly::handleNormalOrOnModeCmd(Mode_t mode, Submode_t s
modeTable[tableIdx].setSubmode(SUBMODE_NONE);
}
};
bool gpsUsable = isModeCommandable(helper.gpsId, helper.gpsMode);
bool gpsUsable = isGpsUsable(submode);
auto gpsCmd = [&](bool gnss0NReset, bool gnss1NReset, uint8_t gnssSelect) {
if (gpsUsable) {
if (mode == MODE_ON or mode == DeviceHandlerIF::MODE_NORMAL) {
@ -296,15 +295,13 @@ void AcsBoardAssembly::handleChildrenLostMode(ReturnValue_t result) {
// Special handling to account for GPS devices being faulty. If the GPS device on the other
// side is marked faulty, directly to to dual side.
if (submode == Submodes::A_SIDE) {
if (healthHelper.healthTable->getHealth(helper.healthDevGps1) == FAULTY or
healthHelper.healthTable->getHealth(helper.healthDevGps1) == PERMANENT_FAULTY) {
if (gps0HealthDevFaulty()) {
triggerEvent(DIRECT_TRANSITION_TO_DUAL_OTHER_GPS_FAULTY, submode, 0);
startTransition(mode, Submodes::DUAL_MODE);
return;
}
} else if (submode == Submodes::B_SIDE) {
if (healthHelper.healthTable->getHealth(helper.healthDevGps0) == FAULTY or
healthHelper.healthTable->getHealth(helper.healthDevGps0) == PERMANENT_FAULTY) {
if (gps1HealthDevFaulty()) {
triggerEvent(DIRECT_TRANSITION_TO_DUAL_OTHER_GPS_FAULTY, submode, 0);
startTransition(mode, Submodes::DUAL_MODE);
return;
@ -312,3 +309,38 @@ void AcsBoardAssembly::handleChildrenLostMode(ReturnValue_t result) {
}
DualLaneAssemblyBase::handleChildrenLostMode(result);
}
bool AcsBoardAssembly::gps0HealthDevFaulty() const {
auto health = healthHelper.healthTable->getHealth(helper.healthDevGps0);
if (health == FAULTY or health == PERMANENT_FAULTY) {
return true;
}
return false;
}
bool AcsBoardAssembly::gps1HealthDevFaulty() const {
auto health = healthHelper.healthTable->getHealth(helper.healthDevGps1);
if (health == FAULTY or health == PERMANENT_FAULTY) {
return true;
}
return false;
}
bool AcsBoardAssembly::isGpsUsable(uint8_t targetSubmode) const {
if (targetSubmode == duallane::A_SIDE and
healthHelper.healthTable->isFaulty(helper.healthDevGps0)) {
// Causes a OFF command to be sent, which triggers a side switch or a switch to dual side.
return false;
}
if (targetSubmode == duallane::B_SIDE and
healthHelper.healthTable->isFaulty(helper.healthDevGps1)) {
// Causes a OFF command to be sent, which triggers a side switch or a switch to dual side.
return false;
}
auto gpsIter = childrenMap.find(helper.gpsId);
// Check if device is already in target mode
if (gpsIter != childrenMap.end() and gpsIter->second.mode == mode) {
return true;
}
return true;
}

View File

@ -21,7 +21,9 @@ struct AcsBoardHelper {
gyro1L3gIdSideA(gyro1Id),
gyro2AdisIdSideB(gyro2Id),
gyro3L3gIdSideB(gyro3Id),
gpsId(gpsId) {}
gpsId(gpsId),
healthDevGps0(gps0HealthDev),
healthDevGps1(gps1HealthDev) {}
object_id_t mgm0Lis3IdSideA = objects::NO_OBJECT;
object_id_t mgm1Rm3100IdSideA = objects::NO_OBJECT;
@ -113,8 +115,8 @@ class AcsBoardAssembly : public DualLaneAssemblyBase {
void selectGpsInDualMode(duallane::Submodes side);
private:
static constexpr pcdu::Switches SWITCH_A = pcdu::Switches::PDU1_CH7_ACS_A_SIDE_3V3;
static constexpr pcdu::Switches SWITCH_B = pcdu::Switches::PDU2_CH7_ACS_BOARD_SIDE_B_3V3;
static constexpr power::Switches SWITCH_A = power::Switches::PDU1_CH7_ACS_A_SIDE_3V3;
static constexpr power::Switches SWITCH_B = power::Switches::PDU2_CH7_ACS_BOARD_SIDE_B_3V3;
AcsBoardHelper helper;
GpioIF* gpioIF = nullptr;
@ -133,6 +135,9 @@ class AcsBoardAssembly : public DualLaneAssemblyBase {
ReturnValue_t handleNormalOrOnModeCmd(Mode_t mode, Submode_t submode);
ReturnValue_t checkAndHandleHealthStates(Mode_t deviceMode, Submode_t deviceSubmode);
void refreshHelperModes();
bool gps0HealthDevFaulty() const;
bool gps1HealthDevFaulty() const;
bool isGpsUsable(uint8_t targetSubmode) const;
};
#endif /* MISSION_SYSTEM_ACSBOARDASSEMBLY_H_ */

View File

@ -5,7 +5,7 @@
#include "OBSWConfig.h"
DualLaneAssemblyBase::DualLaneAssemblyBase(object_id_t objectId, PowerSwitchIF* pwrSwitcher,
pcdu::Switches switch1, pcdu::Switches switch2,
power::Switches switch1, power::Switches switch2,
Event pwrTimeoutEvent, Event sideSwitchNotAllowedEvent,
Event transitionOtherSideFailedEvent)
: AssemblyBase(objectId, 20),
@ -74,7 +74,7 @@ bool DualLaneAssemblyBase::isModeCommandable(object_id_t object, Mode_t mode) {
return true;
}
// Check for external control health state is done by base class.
return false;
return true;
}
ReturnValue_t DualLaneAssemblyBase::pwrStateMachineWrapper() {

View File

@ -18,8 +18,8 @@ class DualLaneAssemblyBase : public AssemblyBase, public ConfirmsFailuresIF {
static constexpr UniqueEventId_t POWER_STATE_MACHINE_TIMEOUT_ID = 2;
static constexpr UniqueEventId_t SIDE_SWITCH_TRANSITION_NOT_ALLOWED_ID = 3;
DualLaneAssemblyBase(object_id_t objectId, PowerSwitchIF* pwrSwitcher, pcdu::Switches switch1,
pcdu::Switches switch2, Event pwrSwitchTimeoutEvent,
DualLaneAssemblyBase(object_id_t objectId, PowerSwitchIF* pwrSwitcher, power::Switches switch1,
power::Switches switch2, Event pwrSwitchTimeoutEvent,
Event sideSwitchNotAllowedEvent, Event transitionOtherSideFailedEvent);
protected:

View File

@ -11,8 +11,13 @@ StrAssembly::StrAssembly(object_id_t objectId) : AssemblyBase(objectId) {
}
ReturnValue_t StrAssembly::commandChildren(Mode_t mode, Submode_t submode) {
commandTable[0].setMode(mode);
// To ensure consistent state.
commandTable[0].setMode(MODE_OFF);
commandTable[0].setSubmode(submode);
if (healthHelper.healthTable->getHealth(objects::STAR_TRACKER) != FAULTY) {
commandTable[0].setMode(mode);
commandTable[0].setSubmode(submode);
}
HybridIterator<ModeListEntry> iter(commandTable.begin(), commandTable.end());
executeTable(iter);
return returnvalue::OK;

View File

@ -44,8 +44,8 @@ class SusAssembly : public DualLaneAssemblyBase {
private:
enum class States { IDLE, SWITCHING_POWER, MODE_COMMANDING } state = States::IDLE;
static constexpr pcdu::Switches SWITCH_NOM = pcdu::Switches::PDU1_CH4_SUS_NOMINAL_3V3;
static constexpr pcdu::Switches SWITCH_RED = pcdu::Switches::PDU2_CH4_SUS_REDUNDANT_3V3;
static constexpr power::Switches SWITCH_NOM = power::Switches::PDU1_CH4_SUS_NOMINAL_3V3;
static constexpr power::Switches SWITCH_RED = power::Switches::PDU2_CH4_SUS_REDUNDANT_3V3;
FixedArrayList<ModeListEntry, NUMBER_SUN_SENSORS> modeTable;
SusAssHelper helper;

View File

@ -1,5 +1,6 @@
#include "ComSubsystem.h"
#include <fsfw/events/Event.h>
#include <fsfw/events/EventManagerIF.h>
#include <fsfw/ipc/MutexGuard.h>
#include <fsfw/ipc/QueueFactory.h>
@ -7,6 +8,7 @@
#include <linux/ipcore/PdecHandler.h>
#include <mission/com/defs.h>
#include <mission/config/comCfg.h>
#include <mission/controller/tcsDefs.h>
#include <utility>
@ -21,7 +23,13 @@ ComSubsystem::ComSubsystem(object_id_t setObjectId, uint32_t maxNumberOfSequence
}
void ComSubsystem::performChildOperation() {
Subsystem::performChildOperation();
readEventQueue();
if (performRecoveryToRxOnly and not isInTransition) {
startRxOnlyRecovery(true);
// To avoid immediately enabling TX after falling back.
rememberBitLock = false;
}
// Execute default rate sequence after transition has been completed
if (rememberBitLock and not isInTransition) {
startRxAndTxLowRateSeq();
@ -30,8 +38,6 @@ void ComSubsystem::performChildOperation() {
if (countdownActive) {
checkTransmitterCountdown();
}
Subsystem::performChildOperation();
}
MessageQueueId_t ComSubsystem::getCommandQueue() const { return Subsystem::getCommandQueue(); }
@ -93,7 +99,11 @@ ReturnValue_t ComSubsystem::initialize() {
"listener"
<< std::endl;
#endif
return ObjectManagerIF::CHILD_INIT_FAILED;
}
result = manager->subscribeToEvent(eventQueue->getId(),
event::getEventId(tcsCtrl::SYRLINKS_OVERHEATING));
if (result != returnvalue::OK) {
return ObjectManager::CHILD_INIT_FAILED;
}
result = manager->subscribeToEventRange(eventQueue->getId(),
event::getEventId(PdecHandler::CARRIER_LOCK),
@ -144,6 +154,19 @@ void ComSubsystem::readEventQueue() {
void ComSubsystem::handleEventMessage(EventMessage *eventMessage) {
Event event = eventMessage->getEvent();
switch (event) {
case tcsCtrl::SYRLINKS_OVERHEATING: {
// This event overrides the bit lock.
rememberBitLock = false;
if (mode == com::RX_ONLY) {
return;
}
if (isInTransition) {
performRecoveryToRxOnly = true;
return;
}
startRxOnlyRecovery(true);
break;
}
case PdecHandler::BIT_LOCK_PDEC: {
handleBitLockEvent();
break;
@ -191,6 +214,12 @@ void ComSubsystem::checkTransmitterCountdown() {
}
}
void ComSubsystem::startRxOnlyRecovery(bool forced) {
modeHelper.setForced(forced);
startTransition(com::RX_ONLY, 0);
performRecoveryToRxOnly = false;
}
bool ComSubsystem::isTxMode(Mode_t mode) {
if ((mode == com::Submode::RX_AND_TX_DEFAULT_DATARATE) ||
(mode == com::Submode::RX_AND_TX_LOW_DATARATE) ||

View File

@ -57,6 +57,7 @@ class ComSubsystem : public Subsystem, public ReceivesParameterMessagesIF {
* @brief Enables transmitter in low rate mode
*/
void startRxAndTxLowRateSeq();
void startRxOnlyRecovery(bool forced);
/**
* @brief Returns true if mode is a mode where the transmitter is on
@ -73,6 +74,7 @@ class ComSubsystem : public Subsystem, public ReceivesParameterMessagesIF {
MessageQueueIF *eventQueue = nullptr;
bool enableTxWhenCarrierLock = false;
bool performRecoveryToRxOnly = false;
// Countdown will be started as soon as the transmitter was enabled
Countdown transmitterCountdown;

View File

@ -3,3 +3,8 @@
CamSwitcher::CamSwitcher(object_id_t objectId, PowerSwitchIF &pwrSwitcher,
power::Switch_t pwrSwitch)
: PowerSwitcherComponent(objectId, &pwrSwitcher, pwrSwitch) {}
void CamSwitcher::performFaultyOperation() {
if (not switcher.active() and switcher.getState() != PowerSwitcher::SWITCH_IS_OFF) {
switcher.turnOff();
}
}

View File

@ -8,6 +8,7 @@ class CamSwitcher : public PowerSwitcherComponent {
CamSwitcher(object_id_t objectId, PowerSwitchIF &pwrSwitcher, power::Switch_t pwrSwitch);
private:
void performFaultyOperation() override;
};
#endif /* MISSION_SYSTEM_OBJECTS_CAMSWITCHER_H_ */

View File

@ -4,11 +4,15 @@
#include <fsfw/events/EventManager.h>
#include <fsfw/ipc/QueueFactory.h>
#include <mission/acs/defs.h>
#include <mission/com/defs.h>
#include <mission/controller/tcsDefs.h>
#include "mission/sysDefs.h"
EiveSystem::EiveSystem(object_id_t setObjectId, uint32_t maxNumberOfSequences,
uint32_t maxNumberOfTables)
: Subsystem(setObjectId, maxNumberOfSequences, maxNumberOfTables) {
auto mqArgs = MqArgs(getObjectId(), static_cast<void*>(this));
auto mqArgs = MqArgs(SubsystemBase::getObjectId(), static_cast<void*>(this));
eventQueue =
QueueFactory::instance()->createMessageQueue(10, EventMessage::EVENT_MESSAGE_SIZE, &mqArgs);
}
@ -16,15 +20,15 @@ EiveSystem::EiveSystem(object_id_t setObjectId, uint32_t maxNumberOfSequences,
void EiveSystem::announceMode(bool recursive) {
const char* modeStr = "UNKNOWN";
switch (mode) {
case (acs::AcsMode::OFF): {
modeStr = "OFF";
case (satsystem::Mode::BOOT): {
modeStr = "OFF/BOOT";
break;
}
case (acs::AcsMode::SAFE): {
case (satsystem::Mode::SAFE): {
modeStr = "SAFE";
break;
}
case (acs::AcsMode::PTG_IDLE): {
case (satsystem::Mode::PTG_IDLE): {
modeStr = "POINTING IDLE";
break;
}
@ -46,12 +50,16 @@ void EiveSystem::announceMode(bool recursive) {
}
void EiveSystem::performChildOperation() {
Subsystem::performChildOperation();
handleEventMessages();
return Subsystem::performChildOperation();
if (not isInTransition and performSafeRecovery) {
commandSelfToSafe();
performSafeRecovery = false;
}
}
ReturnValue_t EiveSystem::initialize() {
EventManagerIF* manager = ObjectManager::instance()->get<EventManagerIF>(objects::EVENT_MANAGER);
auto* manager = ObjectManager::instance()->get<EventManagerIF>(objects::EVENT_MANAGER);
if (manager == nullptr) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "AcsSubsystem::initialize: Invalid event manager" << std::endl;
@ -67,21 +75,37 @@ ReturnValue_t EiveSystem::initialize() {
#endif
return ObjectManagerIF::CHILD_INIT_FAILED;
}
manager->subscribeToEvent(eventQueue->getId(),
event::getEventId(tcsCtrl::PCDU_SYSTEM_OVERHEATING));
manager->subscribeToEvent(eventQueue->getId(), event::getEventId(tcsCtrl::OBC_OVERHEATING));
return Subsystem::initialize();
}
void EiveSystem::handleEventMessages() {
EventMessage event;
for (ReturnValue_t result = eventQueue->receiveMessage(&event); result == returnvalue::OK;
result = eventQueue->receiveMessage(&event)) {
for (ReturnValue_t status = eventQueue->receiveMessage(&event); status == returnvalue::OK;
status = eventQueue->receiveMessage(&event)) {
switch (event.getMessageId()) {
case EventMessage::EVENT_MESSAGE:
switch (event.getEvent()) {
case tcsCtrl::OBC_OVERHEATING:
case tcsCtrl::PCDU_SYSTEM_OVERHEATING: {
if (isInTransition) {
performSafeRecovery = true;
return;
}
commandSelfToSafe();
break;
}
}
break;
default:
sif::debug << "AcsSubsystem::performChildOperation: Did not subscribe "
"to this event message"
<< std::endl;
sif::debug << "EiveSystem: Did not subscribe to event " << event.getEvent() << std::endl;
break;
}
}
}
void EiveSystem::commandSelfToSafe() { startTransition(satsystem::Mode::SAFE, 0); }

View File

@ -8,12 +8,14 @@ class EiveSystem : public Subsystem {
EiveSystem(object_id_t setObjectId, uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables);
private:
MessageQueueIF* eventQueue = nullptr;
bool performSafeRecovery = false;
ReturnValue_t initialize() override;
void performChildOperation() override;
void announceMode(bool recursive) override;
void handleEventMessages();
MessageQueueIF* eventQueue = nullptr;
void commandSelfToSafe();
};
#endif /* MISSION_SYSTEM_EIVESYSTEM_H_ */

View File

@ -31,7 +31,7 @@ class Stack5VHandler {
HandlerState handlerState = HandlerState::IDLE;
bool radSensorIsOn = false;
bool plPcduIsOn = false;
pcdu::Switches stackSwitch = pcdu::Switches::P60_DOCK_5V_STACK;
power::Switches stackSwitch = power::Switches::P60_DOCK_5V_STACK;
bool updateInternalStates();
};

View File

@ -38,7 +38,7 @@ HeaterHandler::HeaterHandler(object_id_t setObjectId_, GpioIF* gpioInterface_, H
cmdQueueSize, MessageQueueMessage::MAX_MESSAGE_SIZE, &mqArgs);
}
HeaterHandler::~HeaterHandler() {}
HeaterHandler::~HeaterHandler() = default;
ReturnValue_t HeaterHandler::performOperation(uint8_t operationCode) {
try {
@ -259,7 +259,7 @@ void HeaterHandler::handleSwitchOnCommand(heater::Switchers heaterIdx) {
// Check state of main line switch
ReturnValue_t mainSwitchState = mainLineSwitcher->getSwitchState(mainLineSwitch);
if (mainSwitchState == PowerSwitchIF::SWITCH_ON) {
if (checkSwitchState(heaterIdx) == SwitchState::OFF) {
if (getSwitchState(heaterIdx) == SwitchState::OFF) {
gpioId_t gpioId = heater.gpioId;
result = gpioInterface->pullHigh(gpioId);
if (result != returnvalue::OK) {
@ -292,12 +292,13 @@ void HeaterHandler::handleSwitchOnCommand(heater::Switchers heaterIdx) {
} else if (mainSwitchState == PowerSwitchIF::SWITCH_OFF && heater.waitMainSwitchOn) {
// Just waiting for the main switch being set on
return;
} else if (mainSwitchState == PowerSwitchIF::SWITCH_OFF) {
} else if (mainSwitchState == PowerSwitchIF::SWITCH_OFF or
mainSwitchState == PowerSwitchIF::SWITCH_UNKNOWN) {
mainLineSwitcher->sendSwitchCommand(mainLineSwitch, PowerSwitchIF::SWITCH_ON);
heater.mainSwitchCountdown.setTimeout(mainLineSwitcher->getSwitchDelayMs());
heater.waitMainSwitchOn = true;
} else {
sif::debug << "HeaterHandler::handleSwitchHandling: Failed to get state of"
sif::debug << "HeaterHandler::handleSwitchOnCommand: Failed to get state of"
<< " main line switch" << std::endl;
if (heater.replyQueue != commandQueue->getId()) {
actionHelper.finish(false, heater.replyQueue, heater.action, mainSwitchState);
@ -310,7 +311,7 @@ void HeaterHandler::handleSwitchOffCommand(heater::Switchers heaterIdx) {
ReturnValue_t result = returnvalue::OK;
auto& heater = heaterVec.at(heaterIdx);
// Check whether switch is already off
if (checkSwitchState(heaterIdx)) {
if (getSwitchState(heaterIdx)) {
gpioId_t gpioId = heater.gpioId;
result = gpioInterface->pullLow(gpioId);
if (result != returnvalue::OK) {
@ -344,7 +345,7 @@ void HeaterHandler::handleSwitchOffCommand(heater::Switchers heaterIdx) {
heater.cmdActive = false;
}
HeaterHandler::SwitchState HeaterHandler::checkSwitchState(heater::Switchers switchNr) const {
HeaterHandler::SwitchState HeaterHandler::getSwitchState(heater::Switchers switchNr) const {
MutexGuard mg(handlerLock, LOCK_TYPE, LOCK_TIMEOUT, LOCK_CTX);
return heaterVec.at(switchNr).switchState;
}
@ -428,7 +429,7 @@ ReturnValue_t HeaterHandler::getSwitchState(uint8_t switchNr) const {
if (switchNr > 7) {
return returnvalue::FAILED;
}
if (checkSwitchState(static_cast<heater::Switchers>(switchNr)) == SwitchState::ON) {
if (getSwitchState(static_cast<heater::Switchers>(switchNr)) == SwitchState::ON) {
return PowerSwitchIF::SWITCH_ON;
}
return PowerSwitchIF::SWITCH_OFF;

View File

@ -174,7 +174,7 @@ class HeaterHandler : public ExecutableObjectIF,
* @brief Returns the state of a switch (ON - true, or OFF - false).
* @param switchNr The number of the switch to check.
*/
SwitchState checkSwitchState(heater::Switchers switchNr) const;
SwitchState getSwitchState(heater::Switchers switchNr) const;
/**
* @brief This function runs commands waiting for execution.

View File

@ -30,14 +30,15 @@ else
fi
cpp_format="clang-format"
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 )"
if command -v ${cpp_format} &> /dev/null; then
for dir in ${folder_list[@]}; do
echo "Auto-formatting C/C++ files in ${dir} recursively"
find ${dir} ${file_selectors} | xargs ${cpp_format} --style=file -i
find ${dir} ${file_excludes} -and ${file_selectors} | xargs ${cpp_format} --style=file -i
done
find ./unittest ${file_selectors} -o -type d -name build -prune | \
xargs clang-format --style=file -i
xargs ${cpp_format} --style=file -i
else
echo "No ${cpp_format} tool found, not formatting C++/C files"
fi

2
tmtc

Submodule tmtc updated: 0f2daf94df...6975fae511

View File

@ -4,6 +4,7 @@
#include <fsfw/tasks/PeriodicTaskIF.h>
#include <fsfw/tasks/TaskFactory.h>
#include <mission/controller/ThermalController.h>
#include <mission/system/objects/CamSwitcher.h>
#include <catch2/catch_test_macros.hpp>
@ -19,7 +20,8 @@ TEST_CASE("Thermal Controller", "[ThermalController]") {
TemperatureSensorInserter::Tmp1075DummyMap map1;
new TemperatureSensorInserter(objects::THERMAL_TEMP_INSERTER, map0, map1);
auto dummyGpioIF = new DummyGpioIF();
auto dummySwitcher = new DummyPowerSwitcher(objects::PCDU_HANDLER, 18, 0);
auto* dummySwitcher = new DummyPowerSwitcher(objects::PCDU_HANDLER, 18, 0);
new CamSwitcher(objects::CAM_SWITCHER, *dummySwitcher, power::Switches::PDU2_CH8_PAYLOAD_CAMERA);
// TODO: Create dummy heater handler
HeaterHandler* heaterHandler = nullptr;
// new ThermalController(objects::THERMAL_CONTROLLER);