Compare commits

...

558 Commits

Author SHA1 Message Date
db74d0490b Merge pull request 'prep v6.5.0' (#792) from prep_v6.5.0 into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #792
2023-09-12 10:49:06 +02:00
c209c71d5f prep v6.5.0
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-09-12 10:17:29 +02:00
2e83627139 Merge pull request 'Relax SUS FDIR' (#677) from relax-sus-fdir into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #677
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-09-12 10:16:06 +02:00
3cb9cd124d bump tmtc
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build started...
2023-09-12 10:08:28 +02:00
fc23438e5d update gen files
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-09-12 10:07:00 +02:00
aa4bf5f293 Merge branch 'main' into relax-sus-fdir
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-09-11 16:11:01 +02:00
7c6cd12f14 Merge pull request 'this might fix the device' (#791) from mgm3100-cfg-adaptions into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #791
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-09-11 15:48:49 +02:00
e26338e4cb adapt event severities
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-09-11 15:39:21 +02:00
55dcb3595b this might fix the device
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-09-07 16:28:55 +02:00
0337104173 another small bugfix
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-09-07 16:09:43 +02:00
5a1b2470f0 some structure clean up
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-09-07 16:07:59 +02:00
c51fbb9074 add recovery handling
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-09-07 16:05:51 +02:00
58961efb3f that should get the job done
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-09-07 16:03:36 +02:00
f9f6ac27e8 Merge remote-tracking branch 'origin/main' into relax-sus-fdir
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-09-07 15:41:59 +02:00
1b295139a0 Merge pull request 'Features for v6.5.0' (#790) from features-v6.5.0 into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #790
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2023-09-07 15:12:14 +02:00
cfbd6d3b1e changelog
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-09-06 14:38:19 +02:00
63b6db258c params for new safe mode 2023-09-06 14:37:04 +02:00
c709bd0881 changelog 2023-09-06 14:35:40 +02:00
a81eae7726 exchange nominal and 1st redundancy sensor for ploc mission board 2023-09-06 14:34:15 +02:00
a39da169d8 Merge pull request 'Bump Submodules' (#788) from bump-submodules into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #788
2023-08-21 18:53:54 +02:00
4f335ea270 bump tmtc
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main Build started...
2023-08-21 18:49:49 +02:00
90b4a4d8c0 bump fsfw 2023-08-21 18:36:01 +02:00
3acdb54fab Merge pull request 'Prep v6.4.1' (#787) from prep-v6.4.1 into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #787
2023-08-21 18:23:12 +02:00
6048ffe656 prep
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-21 16:01:56 +02:00
5060de1f6d Merge pull request 'Fix for MAG Field Vector calculation' (#786) from mgm4-disabled-fix into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #786
2023-08-21 14:51:29 +02:00
26bf178b2a changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-21 14:41:16 +02:00
b9167c7e22 valid check now includes allowed use of mgm4
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-21 14:33:55 +02:00
b97afc9f1c Merge pull request 'PDEC Corrupted Config Event Parameters' (#785) from meier/pdec-event-params into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #785
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-08-21 09:20:30 +02:00
a1d360502f changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-21 09:14:16 +02:00
ddbf4a5ff0 run auto formatter
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-19 06:37:39 +02:00
6febf6242a pdec config corrupted event, readback config used as parameters
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
2023-08-19 06:33:31 +02:00
da71aea101 Merge pull request 'event fix for file corruption' (#784) from persistent-tm-store-event-fix into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #784
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-08-17 16:45:12 +02:00
df397f6dee changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-17 10:28:55 +02:00
e148e95471 event fix for file corruption
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-17 10:27:33 +02:00
b11461c2f7 Merge pull request 'missing changelog entry' (#783) from ploc-supv-changelog into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #783
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-08-16 13:58:04 +02:00
1748d18852 missing changelog entry
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-16 10:57:02 +02:00
8a1e6bc5d2 Merge pull request 'date correction' (#782) from prep_v6.4.0 into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #782
2023-08-16 10:54:50 +02:00
72fc99dc49 date correction
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
2023-08-16 10:54:02 +02:00
3652b6cfad Merge pull request 'PLOC SUPV periodic HK' (#781) from ploc-supv-periodic-hk into main
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build queued...
EIVE/eive-obsw/pipeline/head Build started...
Reviewed-on: #781
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-08-15 18:56:11 +02:00
d1a446d445 hopefully dont need this const
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-15 14:43:23 +02:00
e64e9daed1 bump eive-tmtc
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-08-15 14:42:12 +02:00
963ca0c939 PLOC SUPV
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-08-15 14:34:10 +02:00
2d18ce4ff1 adapt changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-15 13:59:59 +02:00
0b35585449 Merge branch 'prep_v6.4.0' into ploc-supv-periodic-hk 2023-08-15 13:59:47 +02:00
af5f51928b PLOC SUPV periodic HK
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-15 13:49:06 +02:00
6919ab9455 Merge pull request 'new event, bump tmtc' (#779) from new-event into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #779
2023-08-15 13:32:44 +02:00
e4545d0515 new event, bump tmtc
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-main Build queued...
2023-08-15 13:29:46 +02:00
fb2995575b prep next version
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-15 13:26:45 +02:00
77e3b8c359 Merge pull request 'PDEC corrupted Config Event' (#773) from meier/pdec-config-readback into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #773
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-08-15 13:24:02 +02:00
63b483b71a Merge remote-tracking branch 'origin/main' into meier/pdec-config-readback
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build queued...
2023-08-15 13:22:42 +02:00
e24212207f Merge remote-tracking branch 'origin/main' into meier/pdec-config-readback
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build queued...
2023-08-15 13:21:53 +02:00
2ed010327f Merge pull request 'Improve Safe Strat State Machine' (#777) from safe-strat-improvement into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #777
2023-08-15 13:19:14 +02:00
181d355741 bump tmtc
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build started...
2023-08-15 13:17:08 +02:00
0fb57064d3 Merge remote-tracking branch 'origin/main' into safe-strat-improvement 2023-08-15 13:16:58 +02:00
2526873be2 Merge pull request 'Rework PDEC FDIR' (#772) from rework-pdec-fdir into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #772
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-08-15 11:23:54 +02:00
bda57d9bd1 Merge remote-tracking branch 'origin/main' into meier/pdec-config-readback
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-15 10:50:02 +02:00
6fc50f164e Merge remote-tracking branch 'origin/main' into rework-pdec-fdir
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-15 10:49:17 +02:00
41ff0cc9ac Merge remote-tracking branch 'origin/main' into safe-strat-improvement
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-15 10:48:49 +02:00
cc4795c657 Merge pull request 'Flag for MGM4 Usage' (#778) from delete-mgm4-from-existance into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #778
2023-08-15 10:31:13 +02:00
196781ed4a changelog
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-15 09:39:59 +02:00
7ab8fb8cb9 added parameter to disable usage of mgm4 2023-08-15 09:37:54 +02:00
0a42093de3 changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-15 09:20:00 +02:00
d82a6ece5a use safeCtrl even if SUS and MGM vectors are too close
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-15 09:11:57 +02:00
693c183dcc bump tmtc
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-14 16:07:16 +02:00
fe0d2bf832 Merge remote-tracking branch 'origin/main' into meier/pdec-config-readback 2023-08-14 16:06:59 +02:00
37b6c32d15 Merge remote-tracking branch 'origin/main' into rework-pdec-fdir
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-14 16:06:27 +02:00
8447b3c41e Merge pull request 'Use SGP4 Propagator for GPS' (#770) from use-sgp4-propagator into main
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
Reviewed-on: #770
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2023-08-14 15:47:32 +02:00
93896557aa fuck math.h
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-14 15:36:20 +02:00
36b38dd5bf Merge branch 'main' into use-sgp4-propagator
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-08-14 15:34:20 +02:00
639fddcdef Merge pull request 'Cleaner Calculation of MGM and SUS Rate' (#775) from mgm-sus-rate-calc into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #775
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2023-08-14 15:28:33 +02:00
6f8484be2a Merge branch 'main' into mgm-sus-rate-calc
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build queued...
2023-08-14 15:28:22 +02:00
424f3c5247 changelog and re-run generators
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-14 15:09:45 +02:00
e2b54ddb8e Merge remote-tracking branch 'origin/main' into meier/pdec-config-readback
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-14 15:06:58 +02:00
567d68107d auto-formatting
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-14 15:06:22 +02:00
dd5b858666 changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-14 14:59:56 +02:00
acc140412d Merge branch 'use-sgp4-propagator' of https://egit.irs.uni-stuttgart.de/eive/eive-obsw into use-sgp4-propagator
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-14 12:48:47 +02:00
15421240f1 naming 2023-08-14 12:48:22 +02:00
84f7642411 Merge remote-tracking branch 'origin/main' into use-sgp4-propagator
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-14 12:21:53 +02:00
4851c6fdb0 Merge pull request 'Add debug GPS dataset including more data' (#771) from more-gps-tm into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #771
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2023-08-14 12:20:40 +02:00
d65c63b58f Merge branch 'main' into use-sgp4-propagator
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-14 10:50:04 +02:00
819f5c299d Merge branch 'main' into mgm-sus-rate-calc
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-14 10:40:29 +02:00
2af1b6b698 Merge branch 'main' into more-gps-tm
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-14 10:40:07 +02:00
35fe0c909a Merge pull request 'ENOUGH IS ENOUGH' (#774) from ENOUGH-IS-ENOUGH into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #774
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2023-08-14 10:39:49 +02:00
da25d650d9 bugfix
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-14 10:34:06 +02:00
73e9bc9598 Merge remote-tracking branch 'origin/main' into rework-pdec-fdir
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-14 10:32:55 +02:00
0095397b4f that should do the job
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-14 10:30:46 +02:00
9ba8c02e91 changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-14 10:20:28 +02:00
a99895a2b6 cleanup
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-14 10:15:33 +02:00
110c822f41 cleaner calculation of sus rate
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-14 10:08:51 +02:00
5a7f0d08a4 cleaner calculation of mgm rate
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-14 09:53:33 +02:00
d28ec2c31a config word functions pass value now by reference and return returnvalue
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main This commit looks good
EIVE/eive-obsw/pipeline/head Build started...
2023-08-11 16:15:56 +02:00
9201095644 typos
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-09 13:44:10 +02:00
653d13960f ability to disable usage of sgp4 2023-08-09 13:42:54 +02:00
b4c3553965 changelog 2023-08-09 13:41:41 +02:00
e2cce1cb51 added event for TLE being too old 2023-08-09 13:41:25 +02:00
d9879013e6 fsfw
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-09 11:44:17 +02:00
a467dd790f CHANGELOG
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-09 11:32:05 +02:00
185d86245b HOW CAN ANYONE WORK WITH THIS SHITTY SPAM
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-09 11:29:52 +02:00
f3e18f1313 changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-09 11:04:59 +02:00
a9fe166b32 do not use raw gps data anywhere
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-09 10:46:43 +02:00
1069572392 removed debug output 2023-08-09 10:46:24 +02:00
38a8327be0 i hate it here
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-09 10:13:19 +02:00
8a707a2664 Merge branch 'main' into use-sgp4-propagator
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-08-09 09:17:20 +02:00
8e2c6a95e0 debug galore
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-08-08 15:06:35 +02:00
8da08bd328 fix
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-08 14:24:26 +02:00
11578b9d9a i hate myself
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-08 13:47:44 +02:00
04dde604db Merge branch 'main' into more-gps-tm
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-08 09:32:55 +02:00
78f4bbc3a7 Merge pull request 'GPS Changes' (#767) from gps-changes into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #767
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-08-08 09:10:11 +02:00
c3bca9bb54 added event which is triggered when config of pdec is corrupted
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-07 17:08:33 +02:00
8f8c3fd4a2 changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-07 17:00:19 +02:00
99dbab9311 Merge branch 'main' into gps-changes
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-07 16:58:46 +02:00
fa3d5cbc3e handling of which GPS result to use
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-07 16:44:03 +02:00
dfa20545e4 yes ofc i know what every one of these equations does 2023-08-07 16:43:31 +02:00
947eef7170 just in case we ever do this
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-07 13:45:06 +02:00
04c9013c64 feedback of spg4 usage to dataset
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-07 13:37:05 +02:00
e631ab55e6 enum for gps source 2023-08-07 13:36:40 +02:00
a81d911f8e init source pool var 2023-08-07 13:36:12 +02:00
2b03c41305 i guess i had to edit it here, thanks mr cmake god
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-07 13:35:32 +02:00
e261d3609b use spg4 2023-08-07 11:36:30 +02:00
2a0b139f70 spg4 into navigation
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-08-07 11:23:10 +02:00
f9befaebd0 action command to update TLE
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-08-07 10:43:00 +02:00
4b90d26445 add source flag for GPS data
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-07 10:39:20 +02:00
ad6e0e9946 add source flag
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-08-07 10:31:26 +02:00
ef8409d4a8 apparently FLP is part of the cool kids who store their paramenters as datasets
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-07 09:38:35 +02:00
1e9d772d37 changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-04 16:28:06 +02:00
27cf93e6ab lets actually downlink both datasets
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-04 15:54:03 +02:00
9f176e1959 doc correction
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-04 14:28:58 +02:00
e4632b2538 changelog
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-04 14:26:13 +02:00
669c3630a9 reworked PDEC FDIR 2023-08-04 14:23:10 +02:00
d91a71fb51 remove debug output
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-04 12:22:47 +02:00
2952f1feb1 fix 2023-08-04 12:22:31 +02:00
0c25b37c7b gps satellites signals to dataset
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-04 10:50:19 +02:00
348b720885 well this was easy
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-03 20:56:46 +02:00
080b729f11 wow so much progress
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-03 14:41:35 +02:00
05fbff2e6d Merge remote-tracking branch 'origin/main' into relax-sus-fdir
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-03 13:37:36 +02:00
b2d9582a46 Merge pull request 'prep v6.3.0' (#769) from prep_v6.3.0 into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #769
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-08-03 13:17:53 +02:00
155bf9eed0 prep v6.3.0
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-main Build queued...
2023-08-03 13:15:57 +02:00
15618a4c18 Merge pull request 'Fix Calculation of Fused Rotation Rate during Eclipse' (#768) from fused-rot-rate-fix into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #768
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2023-08-03 13:11:04 +02:00
d07568bbe1 Merge branch 'main' into fused-rot-rate-fix
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build queued...
2023-08-03 13:10:15 +02:00
1267097368 Merge pull request 'PL PCDU tweaks' (#766) from pl-pcdu-tweaks into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #766
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-08-03 13:07:10 +02:00
e746c151d3 tweaks
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build started...
2023-08-03 13:03:10 +02:00
5958560d00 cleanup
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-03 11:34:29 +02:00
e258193713 changelog 2023-08-03 11:32:16 +02:00
8f0b0f47c9 not sure if we need it here but doesnot matter 2023-08-03 11:32:08 +02:00
97f40232d7 changelog typo
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-03 10:16:51 +02:00
7c3329abb2 this is more correct
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-03 10:16:11 +02:00
acc50ca7aa fused rotation rate calculation during eclipse can be disabled
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-03 10:09:43 +02:00
6f8ad08e9b changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-03 10:06:10 +02:00
1f02c0ef57 set set to 0 for OFF cmd
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-03 10:05:10 +02:00
093f7f3a31 re-introduce proper bounds checking
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-03 09:59:08 +02:00
a0e4f0a438 Merge branch 'main' into pl-pcdu-tweaks
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-03 09:23:54 +02:00
81311770e8 this might be the fix
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-02 16:26:57 +02:00
8441c49fe6 big gps victory
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-02 16:00:27 +02:00
ff6cb2a2e3 Merge remote-tracking branch 'origin/main' into gps-changes
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-08-02 15:32:01 +02:00
2132f6bb1f Merge pull request 'SCEX filesystem usage fixes' (#765) from scex-fs-usage-improvements into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #765
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-08-02 15:31:48 +02:00
d2c0c1709e that should do the job
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-02 15:29:13 +02:00
b23ae2e152 logiically it works..
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-02 14:17:32 +02:00
eae63a8dc9 add PL PCDU for EM
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-02 14:08:10 +02:00
388dc0a813 gps event spam fix?
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-08-02 13:40:51 +02:00
a88725070b more robust code
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-08-02 13:40:37 +02:00
39c299e55d Merge remote-tracking branch 'origin/main' into scex-fs-usage-improvements
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-02 13:13:55 +02:00
0bbcfb34e8 tweaks for pin handling
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-08-02 11:14:35 +02:00
7f3c71f4dc Merge pull request 'Bugfixes for Detumble Mode' (#764) from acs-detumble-bugfixes into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #764
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2023-08-02 10:43:59 +02:00
03e0cb4ca4 Merge branch 'main' into acs-detumble-bugfixes
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-02 10:28:58 +02:00
5f82b05d3e how many changelog commits will it be
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-02 10:27:14 +02:00
004c60030b changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-02 10:24:24 +02:00
c08024bd0b changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-02 10:23:02 +02:00
6bdafe62ad thank god we never needed this before 2023-08-02 10:22:15 +02:00
7fe676fed9 add event function CALL
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-02 09:44:22 +02:00
2fda3e127e changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-02 09:42:24 +02:00
beb79d2fb4 that should do the job
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-02 09:41:54 +02:00
f0bbc1d090 added filesystem down event
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-02 09:39:42 +02:00
c120ce8617 remove newline 2023-08-02 09:29:55 +02:00
58c19e90eb changelog fix 2023-08-02 09:29:28 +02:00
833166cc78 Merge remote-tracking branch 'origin/main' into scex-fs-usage-improvements 2023-08-02 09:29:04 +02:00
0ea0322e45 Merge pull request 'EIVE system changes for reboot handling' (#763) from pdec-reboot-target-self-image into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #763
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-08-02 09:27:26 +02:00
949ac8942d small corrections
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build queued...
2023-08-02 09:25:01 +02:00
6d18e21edf removed stray return
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build queued...
2023-08-02 09:23:00 +02:00
d9a010f6bd changelog
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
2023-08-02 09:21:53 +02:00
971fd5b4a3 improve SCEX FS usage code 2023-08-02 09:20:36 +02:00
4b4dd35b55 this is the cleanest solution
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build started...
2023-08-02 09:19:43 +02:00
988da377b1 pause the tasks waiting for a reboot
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-02 09:00:45 +02:00
77ffc62236 changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-01 16:41:37 +02:00
bea918e861 added fused rotation calculation to detumble and write detumble strat to dataset
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-01 16:37:42 +02:00
8105e5f689 more robust code
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-01 09:36:08 +02:00
b27694321f update changelog
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-08-01 09:29:34 +02:00
a884176773 improvements for reboot FDIR
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
2023-08-01 09:26:06 +02:00
1f61f7d2e8 Merge pull request 'Small SCEX fix' (#761) from small-scex-fix into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #761
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-08-01 09:08:25 +02:00
85dc977796 changelog
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-27 10:12:06 +02:00
5615f51ae7 Merge remote-tracking branch 'origin/main' into small-scex-fix
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-07-27 10:11:12 +02:00
9219d2bc8c small fix 2023-07-27 10:10:54 +02:00
85a12f071f Merge pull request 'CHANGELOG: HK generation is countdown based' (#760) from fsfw-changelog into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #760
2023-07-26 15:00:58 +02:00
1ae2f692ba HK generation is countdown based
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-26 14:32:13 +02:00
3f73ad86eb Merge pull request 'bump minor version' (#759) from prep-v6.2.0 into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #759
2023-07-26 14:04:48 +02:00
a0735b4fff bump minor version
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-26 13:37:21 +02:00
a71f773f63 Merge pull request 'ACS downwards compatibility' (#758) from acs-downwards-compat into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #758
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-26 13:27:42 +02:00
f7dccdc4c6 bump tmtc again
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build started...
2023-07-26 13:20:32 +02:00
3ebb83b4c0 changelog
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-main Build started...
2023-07-26 13:18:36 +02:00
ee43c0fbd7 Merge remote-tracking branch 'origin/main' into acs-downwards-compat
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
2023-07-26 13:18:13 +02:00
91208c2808 bump tmtc, small tweak for definitions 2023-07-26 13:17:54 +02:00
1dc545c5f0 Merge pull request 'Bump events and tmtc' (#757) from bump-events-and-tmtc into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #757
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-26 13:17:29 +02:00
55c5df0519 ensure downwards compatibilitiy for enum
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-07-26 13:07:14 +02:00
e74ae18763 Merge branch 'main' into bump-events-and-tmtc
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-26 12:58:51 +02:00
e5b19a4463 Merge pull request 'cmake.xml' (#756) from cmake-update into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #756
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-26 12:58:21 +02:00
1f658ceee3 changelog
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
2023-07-26 12:58:12 +02:00
6ef05767c5 events and tmtc 2023-07-26 12:57:39 +02:00
9726c283ef Merge branch 'main' into cmake-update
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-26 12:48:09 +02:00
2110c54d96 Merge pull request 'Simplify image protection code' (#755) from simplify-image-prot-code into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #755
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-26 11:54:03 +02:00
7c0ee9114b changelog
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build started...
2023-07-26 11:26:21 +02:00
e52195e195 bugfix in test
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-26 11:25:28 +02:00
4d195a1b8e bugfix
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-26 11:17:26 +02:00
8c54802e7a Merge remote-tracking branch 'origin/main' into simplify-image-prot-code
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-26 11:12:46 +02:00
8cd959f55a Merge pull request 'SD shutdown handling non-blocking' (#753) from sd-shutdown-non-blocking into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #753
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-26 11:09:47 +02:00
001630cece Merge remote-tracking branch 'origin/main' into sd-shutdown-non-blocking
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build queued...
2023-07-26 11:09:24 +02:00
dbb3434cd9 Merge pull request 'New Safe Mode Controller' (#748) from acs-safe-flp-v2 into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #748
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2023-07-26 11:08:11 +02:00
61e73a4be9 docs
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-26 11:07:04 +02:00
81bb47a6d8 this is a lot better
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
2023-07-26 11:05:36 +02:00
a5c799180e bump tmtc
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-26 09:51:56 +02:00
f5a9a4973c Merge remote-tracking branch 'origin/main' into acs-safe-flp-v2
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-26 09:51:24 +02:00
f60c754c61 changelog typo
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-26 00:33:49 +02:00
ff05181dd3 another evil bug found 2023-07-26 00:30:09 +02:00
7014ab517d some info output 2023-07-25 23:53:39 +02:00
d59ea6eb3d fixed some bugs 2023-07-25 23:48:22 +02:00
abbf170ce2 core controller doing weird things
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-25 16:54:40 +02:00
6767e9a543 cmake.xml
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-25 16:32:22 +02:00
bf730060b5 SD shutdown handling non-blocking
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-25 16:25:00 +02:00
011f4bf5d9 Merge branch 'main' into acs-safe-flp-v2
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-25 09:58:23 +02:00
942b459066 changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-25 09:56:35 +02:00
10dfa07cd9 aluli 2023-07-25 09:55:34 +02:00
61b3ef790a lets pretend this makes it all better
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-24 10:14:38 +02:00
c6294cadbd improved readability?
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-24 10:10:26 +02:00
e2926e25f6 bump tmtc
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-24 09:52:08 +02:00
7e1e02c2bc ????
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-21 14:24:52 +02:00
afc72c0d97 Merge pull request 'active SD Info event' (#752) from active-sd-info-event into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #752
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-21 13:56:13 +02:00
4539d25518 Merge branch 'main' into active-sd-info-event
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-21 11:52:32 +02:00
f989af51f2 Merge pull request 'RAD sensor delay after pulling pin high' (#751) from rad-sensor-delay-after-gpio into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #751
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-21 11:50:48 +02:00
566c1534ee bump tmtc
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-21 11:47:57 +02:00
5f75b22cec new event 2023-07-21 11:36:39 +02:00
7bedb1d307 even more useful events
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-21 11:15:35 +02:00
f736489430 bugfix
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-21 11:10:09 +02:00
7ac19c8ea8 Merge remote-tracking branch 'origin/main' into active-sd-info-event
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-21 10:27:27 +02:00
8251f28cda re-run generators 2023-07-21 10:26:57 +02:00
4e2989d2bd active SD Info event
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-21 10:23:35 +02:00
6efee8d4da whoops
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-21 09:51:14 +02:00
59e07d9b47 Merge branch 'main' into rad-sensor-delay-after-gpio
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-20 17:16:06 +02:00
880c09c510 changelog 2023-07-20 17:16:14 +02:00
7cc95be900 RAD sensor delay after pulling pin high
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-20 17:12:50 +02:00
5e9fd332d9 Merge pull request 'Reduced rad sensor polling' (#747) from rad-sensor-polling-update into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #747
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-20 16:26:53 +02:00
753b9f8a0e better detumble exit
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-20 14:43:43 +02:00
07e002ccd2 detumble from fusedRotRate
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-20 14:22:45 +02:00
53d2e7965a seems more logical 2023-07-20 14:22:24 +02:00
d618e913af old safe mode is default safe mode
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-20 13:53:19 +02:00
5f481fd4d0 keep going people, nothing to see here
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-20 13:09:49 +02:00
b26600ac64 no bugs to see here, please move on
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-20 11:36:44 +02:00
0d501e5064 extended state machine and corrected controller calls
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-07-20 11:32:36 +02:00
32e2d87143 Merge branch 'main' into acs-safe-flp-v2
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-07-20 11:10:46 +02:00
7b0a47b010 use calculation
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-07-20 11:09:46 +02:00
300a6c5ff2 use datasets 2023-07-20 11:09:34 +02:00
d90fd07ba3 a new dataset a day keeps the doctor away
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-20 09:32:48 +02:00
800e29bcb9 missing param
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-19 16:34:02 +02:00
beaacc251b new class YAY
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-07-19 16:25:03 +02:00
b80c96a02c Merge branch 'main' into rad-sensor-polling-update
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-19 16:14:03 +02:00
a52d116857 move CD reset
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-19 15:36:06 +02:00
1c8fea409a Merge pull request 'small fix for PL PCDU' (#749) from pl-pcdu-small-fix into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #749
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-19 15:34:36 +02:00
f61301db13 changelog
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build queued...
2023-07-19 15:34:16 +02:00
c48be8f37b stuff
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-19 15:30:54 +02:00
9dfc8a0e93 new params 2023-07-19 14:41:09 +02:00
8db131f4ab the good fix
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-07-19 14:38:45 +02:00
e50aa2b620 small fix for PL PCDU
Some checks are pending
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-main Build queued...
2023-07-19 14:01:08 +02:00
8451a2f8ef extended state machine
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-07-19 13:24:37 +02:00
ebedb59929 new safe params 2023-07-19 13:24:21 +02:00
0f532e8511 more strats 2023-07-19 13:23:55 +02:00
fbff57dd45 filter galore
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-19 11:47:23 +02:00
910addc27a reset the timer
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-18 18:26:57 +02:00
b2d2c38c58 changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-18 18:24:36 +02:00
a4a5800cba that should do the job
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-18 11:01:53 +02:00
2c9df747e8 Merge pull request 'Add RAD sensor dummy' (#745) from add-rad-sensor-dummy into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #745
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-18 10:52:05 +02:00
4fe921b2cc Merge branch 'main' into add-rad-sensor-dummy
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-18 10:14:33 +02:00
e5f8b08e4b Merge pull request 'sus dummy bugfix' (#746) from small-sus-dummy-bugfix into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #746
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-18 10:10:01 +02:00
ba0fe5f7da bump fsfw
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-18 10:08:04 +02:00
c9a4cf53ca changelog
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build queued...
2023-07-18 10:06:35 +02:00
fa10b6fd95 sus dummy bugfix
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-main Build queued...
2023-07-18 10:04:31 +02:00
5102bd4d69 changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-18 10:03:15 +02:00
ba6f55b93b map rad sensor set
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-18 10:02:14 +02:00
2b8a44f390 always schedule rad sensor
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
2023-07-18 09:57:24 +02:00
08c98bd354 add rad sensor dummy
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-07-18 09:52:26 +02:00
0587f40874 add rad sensor dummy
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-07-18 09:44:44 +02:00
320b460179 Merge pull request 'small FSFW bump' (#744) from small-fsfw-bump into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #744
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-17 13:11:31 +02:00
1510de19a6 small FSFW bump
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-17 10:43:48 +02:00
6ae72db32d Merge pull request 'Add SCEX handler for EM' (#743) from add-scex-for-em into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #743
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-14 15:16:12 +02:00
88d1f9940f changelog
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build queued...
2023-07-14 15:16:08 +02:00
8c4a35fc42 some adaptions for SCEX
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-14 14:31:02 +02:00
e7c8d15773 add SCEX for EM 2023-07-14 14:04:23 +02:00
19a86ac29e Merge pull request 'STR Auto Threshold Config' (#742) from str-auto-threshold-cfg into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #742
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-14 14:03:52 +02:00
1d4e2a70a2 changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-14 12:49:24 +02:00
f1028eb1d9 bump tmtc
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-14 12:47:35 +02:00
c028a696ce Merge branch 'main' into str-auto-threshold-cfg
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-14 12:44:08 +02:00
f832c4522e Merge pull request 'STR time' (#611) from str_set_time into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #611
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-14 12:43:19 +02:00
4e58614c56 changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-13 21:21:42 +02:00
93ea8519b0 works
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-13 21:19:30 +02:00
16dbba6545 done
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-07-13 21:14:39 +02:00
9a451e3d5f COM error event 2023-07-13 21:09:27 +02:00
7870a2015e add auto threshold config
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-07-13 20:49:42 +02:00
80155285c8 remove an unnecessary tweak
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-13 17:37:13 +02:00
c61b0f55a4 some tweaks
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-13 17:35:12 +02:00
6d220692d5 changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-13 17:33:04 +02:00
db61358639 Merge branch 'smaller-str-fix' into str_set_time
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-13 17:31:53 +02:00
fec85ffa6c correct fix
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2023-07-13 17:30:43 +02:00
462da5228a back to default FDIR
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-13 17:23:46 +02:00
e9d4104f88 some further investigation
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-13 17:03:56 +02:00
39022ce2f6 different max missed reply thresholds for STR FDIR
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-13 16:52:33 +02:00
0cefef8a35 rough but possible fix..
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-13 16:38:20 +02:00
d3f3a3efd0 Merge branch 'smaller-str-fix' into str_set_time
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-13 14:57:53 +02:00
6398532462 only enable STR set for normal mode
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-13 14:57:24 +02:00
16f26d7758 afmt
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-13 14:52:32 +02:00
0e3980dc37 this works
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-13 14:52:07 +02:00
cc7e39c484 Merge remote-tracking branch 'origin/main' into str_set_time
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-13 13:26:41 +02:00
448e24e69f Merge branch 'str_set_time' of https://egit.irs.uni-stuttgart.de/eive/eive-obsw into str_set_time 2023-07-13 13:21:56 +02:00
70c4f8f3fd Merge pull request 'v6.1.0' (#740) from prep_v6.1.0 into main
All checks were successful
EIVE/eive-obsw/pipeline/pr-v6.0.0-branch This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #740
2023-07-13 13:07:07 +02:00
1f44533b3e bump minor version
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-13 12:00:57 +02:00
863c0af2a1 what the hell is wrong with the thing?
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-13 10:53:58 +02:00
0fb85883a5 always add STR, rename set field
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-13 10:16:52 +02:00
965c8d21cc Merge branch 'main' into str_set_time
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-13 10:09:38 +02:00
546053f95a Merge pull request 'STR tests' (#739) from startracker-tests into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #739
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-13 09:33:03 +02:00
608eecb091 this is realy buggy somewhere.. 2023-07-12 18:33:02 +02:00
ff432a4194 what the hell is wrong here..
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-12 18:17:00 +02:00
e9d48687d7 i hate this stupid class
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-12 17:59:07 +02:00
735c60d4c2 Merge branch 'startracker-tests' into str_set_time
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-12 17:11:15 +02:00
770d9b7ad3 Merge remote-tracking branch 'origin/main' into str_set_time
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-12 17:06:18 +02:00
86f7d05526 changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-12 17:03:17 +02:00
8cc5220dd0 remove printout
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-12 17:02:52 +02:00
a800ad6c9a Merge remote-tracking branch 'origin/main' into startracker-tests
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-12 16:58:49 +02:00
887bfc87c3 Merge pull request 'use correct clock API in TCS CTRL' (#738) from small-tcs-fix into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #738
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-12 10:29:47 +02:00
54309b512f use correct clock API
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-11 17:29:27 +02:00
74859dd5c6 Merge pull request 'TCS Observability' (#733) from tcs-observability into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #733
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-11 16:47:58 +02:00
13e965948c TCS observability
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-11 13:52:41 +02:00
46bb602c96 bump tmtc
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-07-11 11:01:32 +02:00
72dbc34936 Merge remote-tracking branch 'origin/main' into tcs-observability
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-07-11 11:00:03 +02:00
55affe5a42 Merge pull request 'TCS heater upper burn limit' (#732) from tcs-heater-upper-limit into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #732
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-11 10:56:42 +02:00
914a22f642 Merge branch 'main' into tcs-heater-upper-limit
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-11 10:46:02 +02:00
ed7d75a777 thermal controller
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-11 10:44:46 +02:00
9443d3844a Merge pull request 'fsfw bump and changelog' (#737) from bump-fsfw into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #737
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-11 10:38:59 +02:00
8800b20409 Merge remote-tracking branch 'origin/main' into tcs-heater-upper-limit
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-07-11 09:45:01 +02:00
690f8cb49a Merge remote-tracking branch 'origin/main' into bump-fsfw
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-11 09:41:44 +02:00
dbc3868f47 Merge pull request 'minor tweaks for XADC code' (#736) from minor-xadc-tweak into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #736
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-11 09:40:05 +02:00
852f1203c6 changelog
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build queued...
2023-07-11 09:39:21 +02:00
643f8c5b54 Merge branch 'main' into minor-xadc-tweak
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build queued...
2023-07-11 09:38:14 +02:00
3fb083fd87 Merge pull request 'TCS improvements' (#735) from tcs-tweaks into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #735
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-11 09:37:57 +02:00
fdf1c7a611 seems to work now
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-10 18:29:55 +02:00
cf582dd6a4 Merge branch 'bump-fsfw' into tcs-observability
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-10 17:52:56 +02:00
c7f716c433 fsfw bump and changelog
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-10 17:51:37 +02:00
d2dfc22373 Merge branch 'tcs-heater-upper-limit' into tcs-observability
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-10 16:33:42 +02:00
53d53e8771 disable test case
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-10 16:33:29 +02:00
84e37d8b7b bump tmtc
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-10 16:30:18 +02:00
7c4f98ec22 add back with other name and comment
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-10 15:23:04 +02:00
a61d7901bf Merge branch 'tcs-heater-upper-limit' into tcs-observability
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-10 14:58:16 +02:00
7e01a9602e TCS improvements
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-10 14:46:35 +02:00
be1d1cf5bf minor tweaks for XADC code
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-10 14:15:56 +02:00
ce2755e161 that should be it
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-10 13:56:30 +02:00
33de08eafc this should be better
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-10 13:28:36 +02:00
106d73238b Merge remote-tracking branch 'origin/main' into tcs-heater-upper-limit 2023-07-10 13:07:26 +02:00
3f4a34d616 Merge pull request 'Make OBSW compatible to prospective FW v5.0.0' (#734) from tmp-devs-to-q7-i2c into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #734
2023-07-10 11:19:35 +02:00
268f10ced5 COMPILE
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-10 11:14:19 +02:00
647f3d00bb this should do the job
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-07-10 11:03:17 +02:00
2210ec3737 Merge branch 'tcs-heater-upper-limit' into tcs-observability
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-07 16:21:42 +02:00
df3755d6cc done
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-07 16:18:16 +02:00
a351dcf99e changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-07 15:59:15 +02:00
06fe113d7f that should be sufficient
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-07 15:33:48 +02:00
43d86c9aad resolve merge conflicts properly
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-07 12:24:48 +02:00
c0ae25a973 Merge branch 'tcs-heater-upper-limit' into tcs-observability 2023-07-07 12:23:00 +02:00
fa85cc4d78 pls compile
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-07 12:22:37 +02:00
f7c49adea5 Merge branch 'tcs-heater-upper-limit' into tcs-observability
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-07-07 12:06:51 +02:00
b662e220e1 bump tmtc
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-07-07 12:06:39 +02:00
7337595d47 add event
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-07-07 12:05:29 +02:00
f2f73b088d add event
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-07-07 12:03:34 +02:00
fce16cc695 Merge branch 'tcs-heater-upper-limit' into tcs-observability
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-07-07 11:58:24 +02:00
ff7d0b3989 compile fixes
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-07 11:57:00 +02:00
6bf9fd5969 changelog
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-07-07 11:51:11 +02:00
a7ab26d804 Merge branch 'tcs-heater-upper-limit' into tcs-observability
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-07-07 11:50:32 +02:00
977e9f366f Merge remote-tracking branch 'origin/main' into tcs-heater-upper-limit
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-07-07 11:47:58 +02:00
b3d2fdc277 Merge pull request 'Another TCS fix' (#731) from another-tcs-fix into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #731
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-07 11:47:27 +02:00
7388c4f661 Merge remote-tracking branch 'origin/main' into tcs-heater-upper-limit
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-07-07 11:47:05 +02:00
a6461fcaf8 Merge remote-tracking branch 'origin/main' into another-tcs-fix
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build queued...
2023-07-07 11:45:22 +02:00
6ae0fdf191 Merge pull request 'TCS CTRL bugfix' (#730) from tcs-ctrl-bugfix into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #730
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-07 11:44:38 +02:00
3087049726 Merge branch 'main' into tcs-ctrl-bugfix 2023-07-07 11:44:27 +02:00
8255869f2d Merge pull request 'Some TCS tweaks' (#729) from some-more-tcs-tweaks into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #729
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-07 11:44:08 +02:00
603ddcef9c Merge branch 'tcs-heater-upper-limit' into tcs-observability
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-07-07 11:14:42 +02:00
0b673fcdec Merge remote-tracking branch 'origin/main' into tcs-heater-upper-limit
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-07-07 11:07:35 +02:00
908cf8dcc3 Merge remote-tracking branch 'origin/main' into another-tcs-fix
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-07 11:03:20 +02:00
ec39dc05ae Merge remote-tracking branch 'origin/main' into tcs-ctrl-bugfix
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-07 11:02:43 +02:00
bd33a51bf1 Merge remote-tracking branch 'origin/main' into some-more-tcs-tweaks
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-07 11:00:45 +02:00
06a24da2b9 Merge pull request 'Add TCS CTRL heater events' (#728) from add-tcs-ctrl-heater-events into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #728
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-07 10:59:36 +02:00
2bad2a142b changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-07 10:58:42 +02:00
b0b43b3ecc Merge branch 'main' into some-more-tcs-tweaks
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-07 10:56:50 +02:00
c1a23e0d73 Merge remote-tracking branch 'origin/main' into add-tcs-ctrl-heater-events
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build queued...
2023-07-07 10:56:38 +02:00
377cc64d0f bump tmtc
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build queued...
2023-07-07 10:55:39 +02:00
351c33e504 changelog
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build queued...
2023-07-07 10:55:13 +02:00
a7a530cb59 Merge pull request 'More TMP1075 bugfixes' (#727) from more-tmp-bugfixes into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #727
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-07 10:53:07 +02:00
f1ca4b174f comment
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-06 23:07:54 +02:00
027955597f done 2023-07-06 23:06:50 +02:00
c558a117b0 some docs
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-06 22:21:00 +02:00
fc697732b4 Merge branch 'another-tcs-fix' into tcs-heater-upper-limit 2023-07-06 22:07:06 +02:00
ce19f30325 continue max heater duration 2023-07-06 22:06:54 +02:00
faffca0c2c compile fix
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-06 20:19:05 +02:00
7b611810df there are actually 8 heaters
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-06 20:13:33 +02:00
3e92d175d5 form fix
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-07-06 20:01:57 +02:00
64ca329d5a update changelog
Some checks failed
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-07-06 19:58:24 +02:00
12ff365433 TCS ctrl bugfix
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2023-07-06 19:57:23 +02:00
5ea3bfeb7b Merge branch 'main' into some-more-tcs-tweaks
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-06 19:12:01 +02:00
785c1c65a0 add new events
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-06 19:01:49 +02:00
3c9eec7b3f heater events for TCS ctrl
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
2023-07-06 18:58:57 +02:00
5630ae4962 changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-06 17:28:12 +02:00
61ea80f92c remove some cruft
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-06 17:26:09 +02:00
6182218813 this works but is kind of ugly
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
2023-07-06 17:23:55 +02:00
b7e4953126 the TCS subsystem does not work on the EM..
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-07-06 16:00:39 +02:00
ee4285075a Merge pull request 'Swap PL and PS I2C' (#725) from swap-pl-ps-i2c into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #725
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-06 15:05:53 +02:00
bda2ba79bf Merge remote-tracking branch 'origin/main' into swap-pl-ps-i2c
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
make marius extremely happy
2023-07-06 14:34:12 +02:00
0c47513e98 Merge pull request 'set dataset invalid on OFF mode' (#726) from tmp-1075-set-sets-invalid into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #726
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-06 14:27:04 +02:00
f4f365b110 pool read guard
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-06 13:56:43 +02:00
1d4b815452 this is better to read..
Some checks are pending
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-main Build queued...
2023-07-06 12:04:36 +02:00
1e98fcbbd5 that really should not cause issues though..
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-07-06 12:01:48 +02:00
52eba5cae6 small fix/tweaks
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-05 17:20:42 +02:00
cd9cb48b04 set dataset invalid on OFF mode
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-05 16:31:41 +02:00
5c430212e7 that should fix the host build
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-03 17:32:35 +02:00
d8ab6abc49 FM should build again
Some checks failed
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-07-03 17:16:51 +02:00
d1b9608a14 that should do the job
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2023-07-03 17:13:11 +02:00
25c7058da5 changelog
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2023-07-03 16:56:36 +02:00
9ece676313 lets see if this works 2023-07-03 16:55:45 +02:00
697a3e8577 Merge remote-tracking branch 'origin/main' into swap-pl-ps-i2c
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2023-07-03 16:34:04 +02:00
dea3077f29 changelog, prep v6.0.0
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-07-02 14:44:15 +02:00
d687715bcb Merge pull request 'v6.0.0' (#724) from main-v6 into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #724
2023-07-02 14:43:24 +02:00
e2cd822e9c Merge branch 'main' into main-v6
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-02 14:30:50 +02:00
0e9035d6c1 changelog, prep v5.2.0
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-07-02 14:21:35 +02:00
c80eff4922 Merge pull request 'EM ACS board' (#723) from add-back-em-acs-brd into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #723
2023-07-02 14:19:54 +02:00
a5c9e1481b changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-02 14:04:29 +02:00
e19ddcfbd8 EM ACS board
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-07-02 14:02:37 +02:00
add079a7c6 Merge pull request 'Updates for new firmware' (#721) from complete-fw-tests into main-v6
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #721
2023-07-01 13:30:26 +02:00
9cdcd47b1a Merge remote-tracking branch 'origin/main-v6' into complete-fw-tests
All checks were successful
EIVE/eive-obsw/pipeline/pr-main-v6 This commit looks good
2023-06-30 10:45:16 +02:00
d14e256901 STR tests
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-29 16:40:21 +02:00
dd5270e974 Merge pull request 'Important bugfix for live channel' (#720) from live-channel-bugfix into main-v6
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #720
2023-06-29 16:39:09 +02:00
56ea9af615 add documentation of initial delay
All checks were successful
EIVE/eive-obsw/pipeline/pr-main-v6 This commit looks good
2023-06-29 15:06:25 +02:00
4fc999e102 changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main-v6 This commit looks good
2023-06-29 15:03:45 +02:00
04d24e74b1 q7s-package version specification
All checks were successful
EIVE/eive-obsw/pipeline/pr-main-v6 This commit looks good
2023-06-29 15:01:54 +02:00
8137c9ea25 Merge remote-tracking branch 'origin/main-v6' into complete-fw-tests
All checks were successful
EIVE/eive-obsw/pipeline/pr-main-v6 This commit looks good
2023-06-29 15:00:49 +02:00
723b4bba3f Merge remote-tracking branch 'origin/main-v6' into live-channel-bugfix 2023-06-29 15:00:20 +02:00
8cff2fd6f7 Merge remote-tracking branch 'origin/main' into live-channel-bugfix 2023-06-29 15:00:11 +02:00
a1f7f77e01 Merge remote-tracking branch 'origin/main' into main-v6
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-06-29 14:59:18 +02:00
f3aab775f3 Merge pull request 'Core controller bugfix' (#719) from core-ctrl-init-bugfix into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #719
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-06-29 14:58:28 +02:00
59d542ab39 Merge remote-tracking branch 'origin/main' into core-ctrl-init-bugfix 2023-06-29 14:58:13 +02:00
7b0285c4ce Merge pull request 'Only reset PTME on rate change' (#716) from only-reset-ptme-on-rate-change into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #716
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-06-29 14:56:35 +02:00
0a77ee0508 Merge remote-tracking branch 'origin/main' into only-reset-ptme-on-rate-change
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build queued...
2023-06-29 14:51:15 +02:00
51cbe46cf5 why indeed
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build started...
2023-06-29 14:49:57 +02:00
26fc4b8add Merge pull request 'small fix for persistent TM store' (#722) from persistent-tm-stores-fixes into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #722
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-06-29 14:46:50 +02:00
825de04f3b changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-29 10:15:36 +02:00
33985937b7 typo
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-29 09:44:09 +02:00
ba36b5f091 Merge branch 'main-v6' into live-channel-bugfix
All checks were successful
EIVE/eive-obsw/pipeline/pr-main-v6 This commit looks good
2023-06-29 08:55:09 +02:00
4f5903227e changelog
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main-v6 Build queued...
2023-06-29 08:54:58 +02:00
2173d89047 changelog 2023-06-29 08:54:34 +02:00
0a12dbf2be changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-29 08:53:08 +02:00
ad3c0e2a0e small fix for persistent TM store
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-29 01:28:40 +02:00
03e772246f less cycles..
All checks were successful
EIVE/eive-obsw/pipeline/pr-main-v6 This commit looks good
2023-06-29 00:35:06 +02:00
25da131653 seems to work well
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-main-v6 This commit looks good
2023-06-29 00:33:58 +02:00
4c6b098f42 Merge branch 'live-channel-bugfix' into only-reset-ptme-on-rate-change-v6
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-06-28 17:49:06 +02:00
b57283101b important bugfix for live channel
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-28 17:46:21 +02:00
9dfdf38822 important bugfix for live channel
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-06-28 17:20:10 +02:00
c6240285e2 Merge branch 'core-ctrl-init-bugfix' into only-reset-ptme-on-rate-change-v6
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-06-28 15:51:48 +02:00
87c05705ec core ctrl bugfix
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-28 15:43:44 +02:00
c881b36630 prevent warning
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-06-28 15:28:27 +02:00
a380ff5ac9 Merge branch 'main-v6' into only-reset-ptme-on-rate-change-v6
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-06-28 15:24:20 +02:00
4d17184fba Merge remote-tracking branch 'origin/main' into only-reset-ptme-on-rate-change
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-28 15:18:05 +02:00
d8efd05a88 Merge branch 'main' into main-v6
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-06-28 15:08:38 +02:00
109856eef8 Merge pull request 'prep v5.1.0' (#718) from prep_v5.1.0 into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #718
2023-06-28 13:57:04 +02:00
90bafa717b prep v5.1.0
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-main Build started...
2023-06-28 13:41:51 +02:00
0cdb850f69 Merge pull request 'Seq Count Persistent + MSG type counter' (#711) from sequence-counter-persistent-msg-type-count-support into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #711
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-06-28 13:37:14 +02:00
4c63fed69d that is annoying
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-28 13:35:38 +02:00
eb27ab4bb0 fix and optimization
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-28 13:32:35 +02:00
b0a38136c1 Merge remote-tracking branch 'origin/main' into only-reset-ptme-on-rate-change 2023-06-28 13:28:00 +02:00
6c2548fb56 Merge branch 'main' into sequence-counter-persistent-msg-type-count-support
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build started...
2023-06-28 13:26:55 +02:00
7d3f9ada18 Merge pull request 'higher rx set rate during pass' (#715) from rx-dataset-higher-rate-during-pass into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #715
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-06-28 13:26:42 +02:00
b5cc430b5b Merge remote-tracking branch 'origin/main' into only-reset-ptme-on-rate-change
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-06-28 13:21:33 +02:00
52fedb94e8 bump fsfw and tmtc
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-28 13:20:50 +02:00
cdabf113ca Merge remote-tracking branch 'origin/main' into rx-dataset-higher-rate-during-pass
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build started...
2023-06-28 13:18:45 +02:00
c3e66f5320 changelogge
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-28 13:18:00 +02:00
2d2c1d8721 Merge branch 'main' into sequence-counter-persistent-msg-type-count-support
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-28 10:07:51 +02:00
9e8a417115 Merge pull request 'various improvements for heater handler' (#717) from only-one-heater-cmd-at-a-time into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #717
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-06-28 10:01:20 +02:00
fba87cc0e8 changelog typos
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-27 18:09:38 +02:00
50a8a6fffe more changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-27 18:02:49 +02:00
1e767afa11 only handle one message per cycle 2023-06-27 17:55:49 +02:00
15a67b81f9 various improvements
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-27 17:36:52 +02:00
bf25266055 Merge branch 'main' into rx-dataset-higher-rate-during-pass
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-27 11:05:56 +02:00
ef08f348dc Merge remote-tracking branch 'origin/main' into sequence-counter-persistent-msg-type-count-support
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-26 18:26:08 +02:00
47ff8a418e Merge pull request 'Internal Error Reporter Set' (#702) from internal-error-reporter-set into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #702
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-06-26 18:25:13 +02:00
f0fbed1593 Merge remote-tracking branch 'origin/main' into internal-error-reporter-set
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-26 18:13:44 +02:00
8b2bf21025 Merge remote-tracking branch 'origin/main' into sequence-counter-persistent-msg-type-count-support
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-06-26 18:12:45 +02:00
0764646d2b Merge pull request 'Ordered dumps' (#706) from ordered-dumps into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #706
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-06-26 18:11:07 +02:00
e752cdcc67 bump fsfw
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-26 18:10:41 +02:00
91c53df2c9 Merge remote-tracking branch 'origin/main' into internal-error-reporter-set
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-26 18:03:06 +02:00
c6231d2337 Merge remote-tracking branch 'origin/main' into sequence-counter-persistent-msg-type-count-support
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-26 17:59:26 +02:00
0dfe68eb8d Merge remote-tracking branch 'origin/main' into ordered-dumps
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-26 17:57:26 +02:00
27f77799a6 bump major version
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-06-26 17:33:17 +02:00
9080e7cbe4 Merge branch 'v5.0.0-dev' into main-v6 2023-06-26 17:33:01 +02:00
6c39e7dd0c and go back to newest version here
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-06-26 17:08:39 +02:00
1703f7a714 Merge remote-tracking branch 'origin/main' into internal-error-reporter-set
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-26 15:36:23 +02:00
13bb572348 Merge remote-tracking branch 'origin/main' into sequence-counter-persistent-msg-type-count-support
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-26 15:35:22 +02:00
3e21f9c259 Merge remote-tracking branch 'origin/main' into ordered-dumps
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-26 15:34:58 +02:00
fca6834d17 higher rx set rate during pass
Some checks are pending
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-main Build queued...
2023-06-26 15:32:52 +02:00
1cc62238c2 only reset PTME on rate change init
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-06-26 14:39:03 +02:00
05a5c63765 changelog
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-26 11:20:33 +02:00
c806aa81f0 what does the new compiler want?
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-26 11:14:11 +02:00
93fb207032 C++ insanity..
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-06-25 13:12:39 +02:00
80160e8291 that was hopefully the last set of fixes
Some checks failed
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-06-25 13:07:31 +02:00
5a15d39a1d important order bugfix
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2023-06-25 12:49:51 +02:00
e036ed2bff now its complete
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2023-06-25 12:47:28 +02:00
0db7b5251c Merge branch 'total-boot-counter-file' into sequence-counter-persistent-msg-type-count-support
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2023-06-25 12:45:34 +02:00
873316d012 sequence counter isn ow persistent, msg type count support 2023-06-25 12:41:20 +02:00
0f818a5596 Merge remote-tracking branch 'origin/main' into internal-error-reporter-set
All checks were successful
EIVE/eive-obsw/pipeline/pr-v4.1.0-dev This commit looks good
2023-06-25 11:12:10 +02:00
8b13337845 Merge branch 'ordered-dumps' of https://egit.irs.uni-stuttgart.de/eive/eive-obsw into ordered-dumps
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-25 11:07:47 +02:00
76933671a6 changelog 2023-06-25 11:07:41 +02:00
491a341efe Merge branch 'main' into ordered-dumps
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-25 11:06:24 +02:00
b4778f3ce9 Merge remote-tracking branch 'origin/main' into ordered-dumps
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-24 21:01:35 +02:00
c50a74d117 delete ordering 2023-06-24 21:00:57 +02:00
25d10e3877 that was all the fixes (hopefully) 2023-06-24 20:57:54 +02:00
04f4eedb78 that should make it work
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-24 12:01:12 +02:00
53b48ad99b this is tricky
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2023-06-24 11:46:56 +02:00
a8ab40674f seems to work well
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-24 11:08:50 +02:00
18b67d18a7 seems to work now
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-24 02:07:11 +02:00
97d41a125b Merge remote-tracking branch 'origin/main' into ordered-dumps
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-06-24 01:24:24 +02:00
2e041c3013 some more fixes
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-06-23 17:07:07 +02:00
9023405b96 some fxes
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-06-23 16:05:38 +02:00
1d047f3c92 implement ordered sets
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-06-23 14:55:51 +02:00
253af8193f fix unittest
All checks were successful
EIVE/eive-obsw/pipeline/pr-v4.1.0-dev This commit looks good
2023-06-22 18:43:04 +02:00
3d07814efb Merge remote-tracking branch 'origin/main' into internal-error-reporter-set
Some checks failed
EIVE/eive-obsw/pipeline/pr-v4.1.0-dev There was a failure building this commit
2023-06-22 18:39:34 +02:00
32b074b86e that should fix the build
Some checks failed
EIVE/eive-obsw/pipeline/pr-v4.1.0-dev There was a failure building this commit
2023-06-22 16:29:52 +02:00
461782acdb Merge branch 'v4.0.0-dev' into internal-error-reporter-set
Some checks failed
EIVE/eive-obsw/pipeline/pr-v4.0.0-dev There was a failure building this commit
2023-06-22 16:11:33 +02:00
74e945ddff changelog
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
2023-06-22 16:10:07 +02:00
a3b140b680 internal error reporter extension 2023-06-22 16:09:24 +02:00
df4e657ec3 create TCS CTRL TMP1075 PLCDU 1 se tdynamically
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2023-06-18 17:36:50 +02:00
8f7d3dd815 changelog
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2023-06-18 17:24:19 +02:00
97268af555 another tmp FDIR fix
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2023-06-18 17:11:38 +02:00
322151acf8 tmp fdir bugfix: use strange reply counter 2023-06-18 16:34:07 +02:00
ecb8de1550 need to verify some things here later.. 2023-06-18 16:23:08 +02:00
0cd5526de4 always add TMP devs now 2023-06-18 14:19:19 +02:00
07bb293816 tmp1075 workssssss
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2023-06-18 13:38:00 +02:00
727050520b that should do the job
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2023-06-17 17:24:51 +02:00
269d5f6a0a stupid tmps 2023-06-17 17:01:01 +02:00
d6dd943ebf tmp is back in the house
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2023-06-17 15:28:05 +02:00
31fdbac8c0 Merge remote-tracking branch 'origin/main' into swap-pl-ps-i2c 2023-06-17 14:29:38 +02:00
3e9accfa7b Merge remote-tracking branch 'origin/v4.0.0-dev' into swap-pl-ps-i2c
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-06-16 16:52:05 +02:00
1b919ceaec swap i2cs
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-06-16 13:54:50 +02:00
a023fe2c7d Merge remote-tracking branch 'origin/main' into relax-sus-fdir
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-14 03:43:38 +02:00
2a4d86de54 Merge remote-tracking branch 'origin/main' into relax-sus-fdir
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-14 03:41:34 +02:00
8062c5edad removed old comment
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-13 07:58:40 +02:00
0788a3d551 changelog typo
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-13 07:57:28 +02:00
b2b6e2e797 comment
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-13 07:55:00 +02:00
5e79293d38 Merge remote-tracking branch 'origin/main' into relax-sus-fdir
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2023-06-13 07:49:28 +02:00
196823b2e0 relax sus fdir 2023-06-13 07:48:32 +02:00
3aad452357 fix this some other time
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-main This commit looks good
EIVE/-/pipeline/pr-main Build queued...
2023-04-16 11:35:30 +02:00
67351d5ada set time for star tracker
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2023-04-16 11:25:10 +02:00
147 changed files with 3694 additions and 1605 deletions

3
.idea/cmake.xml generated
View File

@ -2,7 +2,7 @@
<project version="4">
<component name="CMakeSharedSettings">
<configurations>
<configuration PROFILE_NAME="Debug Q7S" ENABLED="true" CONFIG_NAME="Debug" TOOLCHAIN_NAME="Q7S" GENERATION_OPTIONS="-DTGT_BSP=&quot;arm/q7s&quot;" NO_GENERATOR="true">
<configuration PROFILE_NAME="Debug Q7S" ENABLED="true" CONFIG_NAME="Debug" TOOLCHAIN_NAME="Default" GENERATION_OPTIONS="-DTGT_BSP=&quot;arm/q7s&quot;" NO_GENERATOR="true">
<ADDITIONAL_GENERATION_ENVIRONMENT>
<envs>
<env name="ZYNQ_7020_ROOTFS" value="/opt/xiphos/sdk/ark/sysroots/cortexa9hf-neon-xiphos-linux-gnueabi" />
@ -10,6 +10,7 @@
</envs>
</ADDITIONAL_GENERATION_ENVIRONMENT>
</configuration>
<configuration PROFILE_NAME="Debug" ENABLED="true" CONFIG_NAME="Debug" NO_GENERATOR="true" />
</configurations>
</component>
</project>

View File

@ -16,11 +16,239 @@ will consitute of a breaking change warranting a new major release:
# [unreleased]
# [v6.0.0] to be released
# [v6.5.0] 2023-09-12
## Changed
- Relaxed SUS FDIR. The devices have shown to be glitchy in orbit, but still seem to deliver
sensible raw values most of the time. Some further testing is necessary, but some changes in the
code should cause the SUS devices to remain healthy for now.
- The primary and the secondary temperature sensors for the PLOC mission boards are exchanged.
- ACS parameters for the SUSMGM (FLP) safe mode have been adjusted. This safe mode is now the
default one.
- MGM3100 Startup Configuration: Ignore bit 1 of the CMM reply, which is sometimes set to
1 in the reply for some reason.
# [v6.4.1] 2023-08-21
## Fixed
- `PDEC_CONFIG_CORRUPTED` event now actually contains the readback instead of the expected
config
- Magnetic field vector was not calculated if only MGM4 was available, but still written to
the dataset. This would result in a NaN vector. Allowance for usage of MGM4 is now checked
before entering calculation.
# [v6.4.0] 2023-08-16
- `eive-tmtc`: v5.4.3
## Fixed
- The handling function of the GPS data is only called once per GPS read. This should remove
the fake fix-has-changed events.
- Fix for PLOC SUPV HK set parsing.
- The timestamp for the `POSSIBLE_FILE_CORRUPTION` event will be generated properly now.
## Changed
- PDEC FDIR rework: A full PDEC reboot will now only be performed after a regular PDEC reset has
failed 10 times. The mechanism will reset after no PDEC reset has happended for 2 minutes.
The PDEC reset will be performed when counting 4 dirty frame events 10 seconds after the count
was incremented initially.
- GPS Fix has changed event is no longer triggered for the EM
- MGM and SUS rates now will only be calculated, if 2 valid consecutive datapoints are available.
The stored value of the last timestep will now be reset, if no actual value is available.
## Added
- The PLOC SUPV HK set is requested and downlinked periodically if the SUPV is on now.
- SGP4 Propagator is now used for propagating the position of EIVE. It will only work once
a TLE has been uploaded with the newly added action command for the ACS Controller. In
return the actual GPS data will be ignored once SPG4 is running. However, by setting the
according parameter, the ACS Controller can be directed to ignore the SGP4 solution.
- Skyview dataset for more GPS TM has been added
- `PDEC_CONFIG_CORRUPTED` event which is triggered when the PDEC configuration does not match the
expected configuration. P1 will contain the readback of the first word and P2 will contain the
readback of the second word.
- The MGM and SUS vectors being too close together does not prevent the usage of the safe
mode controller anymore.
- Parameter to disable usage of MGM4, which is part of the MTQ and therefore cannot be
disabled without disabling the MTQ itself.
# [v6.3.0] 2023-08-03
## Fixed
- Small SCEX fix: The temperatur check option was not passed
on for commands with a user data size larger than 1.
- SCEX: Properly check whether filesystem is usable for filesystem checks.
- ACS Controller strategy is now actually written to the dataset for detumbling.
- During detumble the fused rotation rate is now calculated.
- Detumbling is now exited when its exit value is undercut and not its entry value.
- Rotation rate of last cycle is now stored in all cases for the fused rotational rate
calculation.
- Fused rotation rate estimation during eclipse can be disabled. This will also prevent
detumbling during eclipse, as no relevant rotational rate is available for now.
- `EiveSystem`: Add a small delay between triggering an event for FDIR reboots and sending the
command to the core controller.
- PL PDU: Fixed bounds checking logic. Bound checks will only be performed for modules which are
enabled.
## Changed
- SCEX: Only perform filesystem checks when not in OFF mode.
- The `EiveSystem` now only sends reboot commands targetting the same image.
- Added 200 ms delay between switching HPA/MPA/TX/X8 and DRO GPIO pin OFF.
- PL PCDU ADC set is now automatically enabled for `NORMAL` mode transitions. It is automatically
disabled for `OFF` mode transitions.
## Added
- PL PCDU for EM build.
- SCEX: Add warning event if filesystem is unusable.
# [v6.2.0] 2023-07-26
- `eive-tmtc`: v5.3.1
## Changed
- STR missed reply handling is now moved to DHB rather than the COM interface. The COM IF will
still trigger an event if a reply is taking too long, and FDIR should still work via reply
timeouts.
- Re-ordered some functions of the core controller in the initialize function.
- Rad sensor is now only polled every 30 minutes instead of every device cycle to reduce wear of
the RADFET electronics.
- The SD cards will still be switched OFF on a reboot, but this is done in a non-blocking manner
now with a timeout of 10 seconds where the reboot will be performed in any case.
- ACS Controller now includes the safe mode from FLP, which will calculate its rotational rate
from SUS and MGM measurements. To accommodate these changes, low-pass filters for SUS
measurements and rates as well as MGM measurements and rates are included. Usage of the new
controller as well as settings of the low-pass filters can be handled via parameter commands.
- Simplify and fix the chip and copy protection functions in the core controller. This mechanism
now is always performed for the target chip and target copy in the reboot handlers.
- Improvement in FSFW: HK generation is now countdown based.
## Added
- 5 ms delay after pulling RADFET enable pin high before starting
the ADC conversion.
- Set STR time in configuration sequence to firmware mode.
- The STR `AutoThreshold` parameters are now set from the configuration JSON file at STR
startup.
- The STR handler can now handle the COM error reply and triggers an low severity event accordingly.
- Add SCEX handler for EM.
- Radiation sensor handler dummy for the EM.
- Added event for SD card information in core controller initialize function. This event will also
be triggered after the SD state machine has run, so the event will generally be triggered twice
at system boot, and once after commanding SD card switches.
## Fixed
- General bugs in the SD card state machine. This might fix some other known bugs for certain
combinations of switching ON and OFF SD cards and also makes the whole state machine a lot more
robust against hanging up.
- SUS dummy handler went to `MODE_NORMAL` for ON commands.
- PL PCDU dummy went to `MODE_NORMAL` for ON commands.
# [v6.1.0] 2023-07-13
- `eive-tmtc`: v5.2.0
## Changed
- TCS: Remove OBC IF board thermal module, which is exactly identical to OBC module and therefore
obsolete.
- Swapped PL and PS I2C, BPX battery and MGT are connected to PS I2C now for firmware versions
equal or above v4. However, this software version is compatible to both v3 and v4 of the firmware.
- The firmware version variables are global statics inititalized early during the program
runtime now. This makes it possible to check the firmware version earlier.
- The TCS controller will now always command heaters OFF when being blind for thermal
components (no sensors available), irrespective of current switch state.
- Make OBSW compatible to prospective FW version v5.0.0, where the Q7 I2C devices were
moved to a PL I2C block and the TMP sensor devices were moved to the PS I2C0.
- Made `Xadc` code a little bit more robust against errors.
## Fixed
- TMP1075: Set dataset invalid on shutdown explicitely
- Small fixes for TMP1075 FDIR: Use strange and missed reply counters.
- TCS controller: Last heater (S-band heater) was skipped for transition completion
checks.
- TCS controller: A helper member to track the elapsed heater control cycles was not reset
properly, which could lead to switch transitions being completed immediately. This can
lead to weird bugs like heaters being commanded ON twice and can potentially lead to
other bugs.
- TMP1075: Devices did not go to OFF mode when being set faulty.
- Update PL PCDU 1 in TCS mode tree on the EM.
- TMP1075: Possibly ignored health commands.
- Bugfix in FSFW where certain packet types could only be sent with source data fields with a
maximum size of 255 bytes.
- TCS CTRL: Limit number of heater handler messages sent in case there are not sensors available
anymore.
- Fix to allow adding real STR device for EM.
# Added
- Two events for heaters being commanded ON and OFF by the TCS controller
- Upper limit for burn time of TCS heaters. Currently set to 1 hour for each heater.
This mechanism will only track the burn time for heaters which were commanded by the
TCS controller.
- TCS controller is now observable by introducing a new HK dataset which exposes some internal
fields related to TCS control.
# [v6.0.0] 2023-07-02
- `q7s-package` version v3.2.0
- Important bugfixes for PTME. See `q7s-package` CHANGELOG.
# [v5.1.0] to be released
## Changed
- Added back PTME busy bit polling. This is necessary due to changes to the AXI APB interface
to the PTME core.
## Fixed
- For the live channel (VC0), telemetry was still only dumped if the transmitter is active.
Please note that this fix will lead to crashes for FW versions below v3.2.
However, it might not be an issue for the oldest firmware on the satellite (v2.5.1).
# [v5.2.0] 2023-07-02
## Fixed
- The firmware information event was not triggered even when possible because of an ordering
bug in the initializer function.
- Empty dumps (no TM in time range) will now correctly be completed immediately
## Changed
- PTME was always reset on submode changes. The reset will now only be performed if the actual data
rate changes.
- Add back ACS board code for the EM. Now that the radiation sensor was removed, the image switching
issue has disappeared and adding back the ACS board is worth it for the GPS timekeeping.
# [v5.1.0] 2023-06-28
- `eive-tmtc` version v5.1.0
## Changed
- Persistent TM store dumps are now performed in chronological order.
- Increase Syrlinks RX HK rate to 5.0 seconds during a pass.
- Various robustness improvements for the heater handler. The heater handler will now only
process the command queue if it is not busy with switch commanding which reduces the amount
of possible bugs.
- The heater handler is only able to process messages stricly sequentially now but is scheduled
twice in a 0.5 second slot so something like a consecutive heater ON or OFF command can still
be handled relatively quickly.
## Added
- Sequence counters for PUS and CFDP packets are now stored persistently across graceful reboots.
- The PUS packet message type counter will now be incremented properly for each PUS service.
- Internal error reporter set is now enabled by default and generated every 120 seconds.
# [v5.0.0] 2023-06-26

View File

@ -9,9 +9,9 @@
# ##############################################################################
cmake_minimum_required(VERSION 3.13)
set(OBSW_VERSION_MAJOR 5)
set(OBSW_VERSION_MINOR 0)
set(OBSW_VERSION_REVISION 0)
set(OBSW_VERSION_MAJOR 6)
set(OBSW_VERSION_MINOR 5)
set(OBSW_VERSION_REVISION 1)
# set(CMAKE_VERBOSE TRUE)
@ -93,7 +93,7 @@ set(OBSW_ADD_BPX_BATTERY_HANDLER
1
CACHE STRING "Add BPX battery module")
set(OBSW_ADD_STAR_TRACKER
${INIT_VAL}
1
CACHE STRING "Add Startracker module")
set(OBSW_ADD_SUN_SENSORS
${INIT_VAL}
@ -105,7 +105,7 @@ set(OBSW_ADD_THERMAL_TEMP_INSERTER
${OBSW_Q7S_EM}
CACHE STRING "Add thermal sensor temperature inserter")
set(OBSW_ADD_ACS_BOARD
${INIT_VAL}
1
CACHE STRING "Add ACS board module")
set(OBSW_ADD_GPS_CTRL
${INIT_VAL}
@ -144,13 +144,13 @@ set(OBSW_ADD_RAD_SENSORS
${INIT_VAL}
CACHE STRING "Add Rad Sensor module")
set(OBSW_ADD_PL_PCDU
${INIT_VAL}
1
CACHE STRING "Add Payload PCDU modukle")
set(OBSW_ADD_SYRLINKS
1
CACHE STRING "Add Syrlinks module")
set(OBSW_ADD_TMP_DEVICES
${INIT_VAL}
1
CACHE STRING "Add TMP devices")
set(OBSW_ADD_GOMSPACE_PCDU
1
@ -162,7 +162,7 @@ set(OBSW_ADD_RW
${INIT_VAL}
CACHE STRING "Add RW modules")
set(OBSW_ADD_SCEX_DEVICE
${INIT_VAL}
1
CACHE STRING "Add Solar Cell Experiment module")
set(OBSW_SYRLINKS_SIMULATED
0
@ -240,6 +240,9 @@ set(FSFW_WARNING_SHADOW_LOCAL_GCC OFF)
set(EIVE_ADD_LINUX_FILES OFF)
set(FSFW_ADD_TMSTORAGE ON)
set(FSFW_ADD_COORDINATES ON)
set(FSFW_ADD_SGP4_PROPAGATOR ON)
# Analyse different OS and architecture/target options, determine BSP_PATH,
# display information about compiler etc.
pre_source_hw_os_config()

View File

@ -964,6 +964,12 @@ used by other software components to read the current chip and copy.
This is a configuration scripts which runs after the Network Time Protocol has run. This script
currently sets the static IP address `192.168.133.10` and starts the `can` interface.
## Initial boot delay
You can create a file named `boot_delays_secs.txt` inside the home folder to delay the OBSW boot
for 6 seconds if the file is empty of for the number of seconds specified inside the file. This
can be helpful if something inside the OBSW leads to an immediate crash of the OBC.
## PCDU
Connect to serial console of P60 Dock

View File

@ -68,7 +68,7 @@ void ObjectFactory::produce(void* args) {
#endif
auto sdcMan = new DummySdCardManager("/tmp");
ObjectFactory::produceGenericObjects(nullptr, &pusFunnel, &cfdpFunnel, *sdcMan, &ipcStore,
&tmStore, persistentStores, 120);
&tmStore, persistentStores, 120, enableHkSets);
new TmFunnelHandler(objects::LIVE_TM_TASK, *pusFunnel, *cfdpFunnel);
auto* dummyGpioIF = new DummyGpioIF();
@ -113,7 +113,7 @@ void ObjectFactory::produce(void* args) {
if (heaterHandler == nullptr) {
sif::error << "HeaterHandler could not be created" << std::endl;
} else {
ObjectFactory::createThermalController(*heaterHandler);
ObjectFactory::createThermalController(*heaterHandler, true);
}
new TestTask(objects::TEST_TASK);
}

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 296 translations.
* @brief Auto-generated event translation file. Contains 306 translations.
* @details
* Generated on: 2023-06-21 19:01:02
* Generated on: 2023-09-12 10:05:17
*/
#include "translateEvents.h"
@ -100,6 +100,7 @@ const char *MEKF_RECOVERY_STRING = "MEKF_RECOVERY";
const char *MEKF_AUTOMATIC_RESET_STRING = "MEKF_AUTOMATIC_RESET";
const char *MEKF_INVALID_MODE_VIOLATION_STRING = "MEKF_INVALID_MODE_VIOLATION";
const char *SAFE_MODE_CONTROLLER_FAILURE_STRING = "SAFE_MODE_CONTROLLER_FAILURE";
const char *TLE_TOO_OLD_STRING = "TLE_TOO_OLD";
const char *SWITCH_CMD_SENT_STRING = "SWITCH_CMD_SENT";
const char *SWITCH_HAS_CHANGED_STRING = "SWITCH_HAS_CHANGED";
const char *SWITCHING_Q7S_DENIED_STRING = "SWITCHING_Q7S_DENIED";
@ -139,6 +140,7 @@ const char *ERROR_STATE_STRING = "ERROR_STATE";
const char *RESET_OCCURED_STRING = "RESET_OCCURED";
const char *BOOTING_FIRMWARE_FAILED_EVENT_STRING = "BOOTING_FIRMWARE_FAILED_EVENT";
const char *BOOTING_BOOTLOADER_FAILED_EVENT_STRING = "BOOTING_BOOTLOADER_FAILED_EVENT";
const char *COM_ERROR_REPLY_RECEIVED_STRING = "COM_ERROR_REPLY_RECEIVED";
const char *SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING = "SUPV_MEMORY_READ_RPT_CRC_FAILURE";
const char *SUPV_UNKNOWN_TM_STRING = "SUPV_UNKNOWN_TM";
const char *SUPV_UNINIMPLEMENTED_TM_STRING = "SUPV_UNINIMPLEMENTED_TM";
@ -166,6 +168,7 @@ const char *PDEC_TRYING_RESET_NO_INIT_STRING = "PDEC_TRYING_RESET_NO_INIT";
const char *PDEC_RESET_FAILED_STRING = "PDEC_RESET_FAILED";
const char *OPEN_IRQ_FILE_FAILED_STRING = "OPEN_IRQ_FILE_FAILED";
const char *PDEC_INIT_FAILED_STRING = "PDEC_INIT_FAILED";
const char *PDEC_CONFIG_CORRUPTED_STRING = "PDEC_CONFIG_CORRUPTED";
const char *IMAGE_UPLOAD_FAILED_STRING = "IMAGE_UPLOAD_FAILED";
const char *IMAGE_DOWNLOAD_FAILED_STRING = "IMAGE_DOWNLOAD_FAILED";
const char *IMAGE_UPLOAD_SUCCESSFUL_STRING = "IMAGE_UPLOAD_SUCCESSFUL";
@ -260,6 +263,7 @@ const char *TX_OFF_STRING = "TX_OFF";
const char *MISSING_PACKET_STRING = "MISSING_PACKET";
const char *EXPERIMENT_TIMEDOUT_STRING = "EXPERIMENT_TIMEDOUT";
const char *MULTI_PACKET_COMMAND_DONE_STRING = "MULTI_PACKET_COMMAND_DONE";
const char *FS_UNUSABLE_STRING = "FS_UNUSABLE";
const char *SET_CONFIGFILEVALUE_FAILED_STRING = "SET_CONFIGFILEVALUE_FAILED";
const char *GET_CONFIGFILEVALUE_FAILED_STRING = "GET_CONFIGFILEVALUE_FAILED";
const char *INSERT_CONFIGFILEVALUE_FAILED_STRING = "INSERT_CONFIGFILEVALUE_FAILED";
@ -278,6 +282,7 @@ const char *TRYING_I2C_RECOVERY_STRING = "TRYING_I2C_RECOVERY";
const char *I2C_REBOOT_STRING = "I2C_REBOOT";
const char *PDEC_REBOOT_STRING = "PDEC_REBOOT";
const char *FIRMWARE_INFO_STRING = "FIRMWARE_INFO";
const char *ACTIVE_SD_INFO_STRING = "ACTIVE_SD_INFO";
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";
@ -286,6 +291,9 @@ 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 *MGT_OVERHEATING_STRING = "MGT_OVERHEATING";
const char *TCS_SWITCHING_HEATER_ON_STRING = "TCS_SWITCHING_HEATER_ON";
const char *TCS_SWITCHING_HEATER_OFF_STRING = "TCS_SWITCHING_HEATER_OFF";
const char *TCS_HEATER_MAX_BURN_TIME_REACHED_STRING = "TCS_HEATER_MAX_BURN_TIME_REACHED";
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";
@ -301,6 +309,8 @@ const char *DUMP_NOK_CANCELLED_STRING = "DUMP_NOK_CANCELLED";
const char *DUMP_MISC_CANCELLED_STRING = "DUMP_MISC_CANCELLED";
const char *DUMP_HK_CANCELLED_STRING = "DUMP_HK_CANCELLED";
const char *DUMP_CFDP_CANCELLED_STRING = "DUMP_CFDP_CANCELLED";
const char *TEMPERATURE_ALL_ONES_START_STRING = "TEMPERATURE_ALL_ONES_START";
const char *TEMPERATURE_ALL_ONES_RECOVERY_STRING = "TEMPERATURE_ALL_ONES_RECOVERY";
const char *translateEvents(Event event) {
switch ((event & 0xFFFF)) {
@ -494,6 +504,8 @@ const char *translateEvents(Event event) {
return MEKF_INVALID_MODE_VIOLATION_STRING;
case (11207):
return SAFE_MODE_CONTROLLER_FAILURE_STRING;
case (11208):
return TLE_TOO_OLD_STRING;
case (11300):
return SWITCH_CMD_SENT_STRING;
case (11301):
@ -572,6 +584,8 @@ const char *translateEvents(Event event) {
return BOOTING_FIRMWARE_FAILED_EVENT_STRING;
case (11902):
return BOOTING_BOOTLOADER_FAILED_EVENT_STRING;
case (11903):
return COM_ERROR_REPLY_RECEIVED_STRING;
case (12001):
return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING;
case (12002):
@ -626,6 +640,8 @@ const char *translateEvents(Event event) {
return OPEN_IRQ_FILE_FAILED_STRING;
case (12414):
return PDEC_INIT_FAILED_STRING;
case (12415):
return PDEC_CONFIG_CORRUPTED_STRING;
case (12500):
return IMAGE_UPLOAD_FAILED_STRING;
case (12501):
@ -814,6 +830,8 @@ const char *translateEvents(Event event) {
return EXPERIMENT_TIMEDOUT_STRING;
case (13802):
return MULTI_PACKET_COMMAND_DONE_STRING;
case (13803):
return FS_UNUSABLE_STRING;
case (13901):
return SET_CONFIGFILEVALUE_FAILED_STRING;
case (13902):
@ -850,6 +868,8 @@ const char *translateEvents(Event event) {
return PDEC_REBOOT_STRING;
case (14013):
return FIRMWARE_INFO_STRING;
case (14014):
return ACTIVE_SD_INFO_STRING;
case (14100):
return NO_VALID_SENSOR_TEMPERATURE_STRING;
case (14101):
@ -866,6 +886,12 @@ const char *translateEvents(Event event) {
return HEATER_NOT_OFF_FOR_OFF_MODE_STRING;
case (14108):
return MGT_OVERHEATING_STRING;
case (14109):
return TCS_SWITCHING_HEATER_ON_STRING;
case (14110):
return TCS_SWITCHING_HEATER_OFF_STRING;
case (14111):
return TCS_HEATER_MAX_BURN_TIME_REACHED_STRING;
case (14201):
return TX_TIMER_EXPIRED_STRING;
case (14202):
@ -896,6 +922,10 @@ const char *translateEvents(Event event) {
return DUMP_HK_CANCELLED_STRING;
case (14314):
return DUMP_CFDP_CANCELLED_STRING;
case (14500):
return TEMPERATURE_ALL_ONES_START_STRING;
case (14501):
return TEMPERATURE_ALL_ONES_RECOVERY_STRING;
default:
return "UNKNOWN_EVENT";
}

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file.
* @details
* Contains 171 translations.
* Generated on: 2023-06-21 19:01:02
* Generated on: 2023-09-12 10:05:17
*/
#include "translateObjects.h"

View File

@ -7,7 +7,8 @@ target_link_libraries(${SIMPLE_OBSW_NAME} PUBLIC ${LIB_FSFW_NAME})
target_compile_definitions(${SIMPLE_OBSW_NAME} PRIVATE "Q7S_SIMPLE_MODE")
add_subdirectory(simple)
target_sources(${OBSW_NAME} PUBLIC main.cpp obsw.cpp)
target_sources(${OBSW_NAME} PUBLIC main.cpp obsw.cpp scheduling.cpp
objectFactory.cpp)
add_subdirectory(boardtest)

View File

@ -12,6 +12,9 @@ static constexpr char SPI_RW_DEV[] = "/dev/spi_rw";
static constexpr char I2C_PL_EIVE[] = "/dev/i2c_pl";
//! I2C bus using the I2C peripheral of the ARM processing system (PS)
static constexpr char I2C_PS_EIVE[] = "/dev/i2c_ps";
//! I2C bus using the first I2C peripheral of the ARM processing system (PS).
//! Named like this because it is used by default for the Q7 devices.
static constexpr char I2C_Q7_EIVE[] = "/dev/i2c_q7";
static constexpr char UART_GNSS_DEV[] = "/dev/gps0";
static constexpr char UART_PLOC_MPSOC_DEV[] = "/dev/ul_plmpsoc";
@ -85,13 +88,9 @@ static constexpr char EN_RW_4[] = "enable_rw_4";
static constexpr char RAD_SENSOR_CHIP_SELECT[] = "rad_sensor_chip_select";
static constexpr char ENABLE_RADFET[] = "enable_radfet";
static constexpr char PAPB_BUSY_SIGNAL_VC0[] = "papb_busy_signal_vc0";
static constexpr char PAPB_EMPTY_SIGNAL_VC0[] = "papb_empty_signal_vc0";
static constexpr char PAPB_BUSY_SIGNAL_VC1[] = "papb_busy_signal_vc1";
static constexpr char PAPB_EMPTY_SIGNAL_VC1[] = "papb_empty_signal_vc1";
static constexpr char PAPB_BUSY_SIGNAL_VC2[] = "papb_busy_signal_vc2";
static constexpr char PAPB_EMPTY_SIGNAL_VC2[] = "papb_empty_signal_vc2";
static constexpr char PAPB_BUSY_SIGNAL_VC3[] = "papb_busy_signal_vc3";
static constexpr char PAPB_EMPTY_SIGNAL_VC3[] = "papb_empty_signal_vc3";
static constexpr char PTME_RESETN[] = "ptme_resetn";

View File

@ -218,15 +218,30 @@ void Q7STestTask::testProtHandler() {
bool opPerformed = false;
ReturnValue_t result = returnvalue::OK;
// If any chips are unlocked, lock them here
result = coreController->setBootCopyProtection(xsc::Chip::ALL_CHIP, xsc::Copy::ALL_COPY, true,
opPerformed, true);
result = coreController->setBootCopyProtectionAndUpdateFile(xsc::Chip::CHIP_0, xsc::Copy::COPY_0,
true);
if (result != returnvalue::OK) {
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
}
result = coreController->setBootCopyProtectionAndUpdateFile(xsc::Chip::CHIP_0, xsc::Copy::COPY_1,
true);
if (result != returnvalue::OK) {
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
}
result = coreController->setBootCopyProtectionAndUpdateFile(xsc::Chip::CHIP_1, xsc::Copy::COPY_0,
true);
if (result != returnvalue::OK) {
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
}
result = coreController->setBootCopyProtectionAndUpdateFile(xsc::Chip::CHIP_1, xsc::Copy::COPY_1,
true);
if (result != returnvalue::OK) {
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
}
// unlock own copy
result = coreController->setBootCopyProtection(xsc::Chip::SELF_CHIP, xsc::Copy::SELF_COPY, false,
opPerformed, true);
result = coreController->setBootCopyProtectionAndUpdateFile(xsc::Chip::SELF_CHIP,
xsc::Copy::SELF_COPY, false);
if (result != returnvalue::OK) {
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
}
@ -239,8 +254,8 @@ void Q7STestTask::testProtHandler() {
}
// lock own copy
result = coreController->setBootCopyProtection(xsc::Chip::SELF_CHIP, xsc::Copy::SELF_COPY, true,
opPerformed, true);
result = coreController->setBootCopyProtectionAndUpdateFile(xsc::Chip::SELF_CHIP,
xsc::Copy::SELF_COPY, true);
if (result != returnvalue::OK) {
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
}
@ -253,8 +268,8 @@ void Q7STestTask::testProtHandler() {
}
// unlock specific copy
result = coreController->setBootCopyProtection(xsc::Chip::CHIP_1, xsc::Copy::COPY_1, false,
opPerformed, true);
result = coreController->setBootCopyProtectionAndUpdateFile(xsc::Chip::CHIP_1, xsc::Copy::COPY_1,
false);
if (result != returnvalue::OK) {
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
}
@ -267,8 +282,8 @@ void Q7STestTask::testProtHandler() {
}
// lock specific copy
result = coreController->setBootCopyProtection(xsc::Chip::CHIP_1, xsc::Copy::COPY_1, true,
opPerformed, true);
result = coreController->setBootCopyProtectionAndUpdateFile(xsc::Chip::CHIP_1, xsc::Copy::COPY_1,
true);
if (result != returnvalue::OK) {
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
}

View File

@ -1,4 +1 @@
target_sources(${OBSW_NAME} PRIVATE CoreController.cpp scheduling.cpp
ObjectFactory.cpp WatchdogHandler.cpp)
target_sources(${SIMPLE_OBSW_NAME} PRIVATE scheduling.cpp)
target_sources(${OBSW_NAME} PRIVATE CoreController.cpp WatchdogHandler.cpp)

View File

@ -156,23 +156,12 @@ ReturnValue_t CoreController::initialize() {
if (result != returnvalue::OK) {
sif::warning << "CoreController::initialize: Base init failed" << std::endl;
}
result = scratch::writeNumber(scratch::ALLOC_FAILURE_COUNT, 0);
if (result != returnvalue::OK) {
sif::warning << "CoreController::initialize: Setting up alloc failure "
"count failed"
<< std::endl;
}
result = paramHelper.initialize();
if (result != returnvalue::OK) {
return result;
}
sdStateMachine();
triggerEvent(core::REBOOT_SW, CURRENT_CHIP, CURRENT_COPY);
announceCurrentImageInfo();
announceVersionInfo();
EventManagerIF *eventManager =
ObjectManager::instance()->get<EventManagerIF>(objects::EVENT_MANAGER);
if (eventManager == nullptr or eventQueue == nullptr) {
@ -189,17 +178,20 @@ ReturnValue_t CoreController::initialize() {
if (result != returnvalue::OK) {
sif::warning << "Subscribing for GPS GPS_FIX_CHANGE event failed" << std::endl;
}
if (common::OBSW_VERSION_MAJOR >= 6 or common::OBSW_VERSION_MAJOR == 4) {
UioMapper sysRomMapper(q7s::UIO_SYS_ROM);
result = sysRomMapper.getMappedAdress(&mappedSysRomAddr, UioMapper::Permissions::READ_ONLY);
if (result != returnvalue::OK) {
// TODO: This might be a reason to switch to another image..
sif::error << "Getting mapped SYS ROM UIO address failed" << std::endl;
return ObjectManager::CHILD_INIT_FAILED;
}
triggerEvent(core::REBOOT_SW, CURRENT_CHIP, CURRENT_COPY);
announceCurrentImageInfo();
announceVersionInfo();
SdCardManager::SdStatePair sdStates;
sdcMan->getSdCardsStatus(sdStates);
announceSdInfo(sdStates);
sdStateMachine();
result = scratch::writeNumber(scratch::ALLOC_FAILURE_COUNT, 0);
if (result != returnvalue::OK) {
sif::warning << "CoreController::initialize: Setting up alloc failure "
"count failed"
<< std::endl;
}
return returnvalue::OK;
return result;
}
ReturnValue_t CoreController::initializeAfterTaskCreation() {
@ -562,21 +554,24 @@ ReturnValue_t CoreController::sdStateMachine() {
}
// This lambda checks the non-blocking operation of the SD card manager and assigns the new
// state on success. It returns true for an operation success and false otherwise
// state on success. It returns 0 for an operation success, -1 for failed operations, and 1
// for pending operations
auto nonBlockingSdcOpChecking = [&](SdStates newStateOnSuccess, uint16_t maxCycleCount,
std::string opPrintout) {
SdCardManager::OpStatus status = sdcMan->checkCurrentOp(operation);
if (status == SdCardManager::OpStatus::SUCCESS) {
if (status == SdCardManager::OpStatus::SUCCESS or sdInfo.cycleCount > maxCycleCount) {
sdFsmState = newStateOnSuccess;
sdInfo.commandPending = false;
if (sdInfo.cycleCount > maxCycleCount) {
sif::warning << "CoreController::sdStateMachine: " << opPrintout << " takes too long"
<< std::endl;
sdInfo.cycleCount = 0;
return -1;
}
sdInfo.cycleCount = 0;
return true;
} else if (sdInfo.cycleCount > 4) {
sif::warning << "CoreController::sdStateMachine: " << opPrintout << " takes too long"
<< std::endl;
return false;
}
return false;
return 0;
};
return 1;
};
if (sdFsmState == SdStates::UPDATE_SD_INFO_START) {
@ -652,7 +647,7 @@ ReturnValue_t CoreController::sdStateMachine() {
sdFsmState = tgtState;
}
} else {
if (nonBlockingSdcOpChecking(SdStates::MOUNT_SELF, 10, "Setting SDC state")) {
if (nonBlockingSdcOpChecking(SdStates::MOUNT_SELF, 10, "Setting SDC state") <= 0) {
sdInfo.activeState = sd::SdState::ON;
currentStateSetter(sdInfo.active, sd::SdState::ON);
// Skip the two cycles now.
@ -680,7 +675,7 @@ ReturnValue_t CoreController::sdStateMachine() {
result = sdCardSetup(sdInfo.active, sd::SdState::MOUNTED, sdInfo.activeChar);
sdInfo.commandPending = true;
} else {
if (nonBlockingSdcOpChecking(SdStates::DETERMINE_OTHER, 5, "Mounting SD card")) {
if (nonBlockingSdcOpChecking(SdStates::DETERMINE_OTHER, 5, "Mounting SD card") <= 0) {
sdcMan->setActiveSdCard(sdInfo.active);
currMntPrefix = sdcMan->getCurrentMountPrefix();
sdInfo.activeState = sd::SdState::MOUNTED;
@ -722,12 +717,7 @@ ReturnValue_t CoreController::sdStateMachine() {
sdInfo.commandPending = true;
} else {
if (nonBlockingSdcOpChecking(SdStates::SKIP_CYCLE_BEFORE_INFO_UPDATE, 10,
"Switching off other SD card")) {
sdInfo.otherState = sd::SdState::OFF;
currentStateSetter(sdInfo.other, sd::SdState::OFF);
} else {
// Continue.. avoid being stuck here..
sdFsmState = SdStates::SKIP_CYCLE_BEFORE_INFO_UPDATE;
"Switching off other SD card") <= 0) {
sdInfo.otherState = sd::SdState::OFF;
currentStateSetter(sdInfo.other, sd::SdState::OFF);
}
@ -738,12 +728,7 @@ ReturnValue_t CoreController::sdStateMachine() {
sdInfo.commandPending = true;
} else {
if (nonBlockingSdcOpChecking(SdStates::MOUNT_UNMOUNT_OTHER, 10,
"Switching on other SD card")) {
sdInfo.otherState = sd::SdState::ON;
currentStateSetter(sdInfo.other, sd::SdState::ON);
} else {
// Contnue.. avoid being stuck here.
sdFsmState = SdStates::MOUNT_UNMOUNT_OTHER;
"Switching on other SD card") <= 0) {
sdInfo.otherState = sd::SdState::ON;
currentStateSetter(sdInfo.other, sd::SdState::ON);
}
@ -758,7 +743,8 @@ ReturnValue_t CoreController::sdStateMachine() {
result = sdCardSetup(sdInfo.other, sd::SdState::ON, sdInfo.otherChar);
sdInfo.commandPending = true;
} else {
if (nonBlockingSdcOpChecking(SdStates::SET_STATE_OTHER, 10, "Unmounting other SD card")) {
if (nonBlockingSdcOpChecking(SdStates::SET_STATE_OTHER, 10, "Unmounting other SD card") <=
0) {
sdInfo.otherState = sd::SdState::ON;
currentStateSetter(sdInfo.other, sd::SdState::ON);
} else {
@ -772,7 +758,8 @@ ReturnValue_t CoreController::sdStateMachine() {
result = sdCardSetup(sdInfo.other, sd::SdState::MOUNTED, sdInfo.otherChar);
sdInfo.commandPending = true;
} else {
if (nonBlockingSdcOpChecking(SdStates::UPDATE_SD_INFO_END, 4, "Mounting other SD card")) {
if (nonBlockingSdcOpChecking(SdStates::UPDATE_SD_INFO_END, 4, "Mounting other SD card") <=
0) {
sdInfo.otherState = sd::SdState::MOUNTED;
currentStateSetter(sdInfo.other, sd::SdState::MOUNTED);
}
@ -809,6 +796,7 @@ ReturnValue_t CoreController::sdStateMachine() {
}
sif::info << "SD card update into " << modeStr
<< " mode finished. Active SD: " << sdInfo.activeChar << std::endl;
announceSdInfo(sdInfo.currentState);
if (not sdInfo.initFinished) {
updateInternalSdInfo();
sdInfo.initFinished = true;
@ -847,7 +835,7 @@ ReturnValue_t CoreController::sdCardSetup(sd::SdCard sdCard, sd::SdState targetS
if (state == sd::SdState::MOUNTED) {
if (targetState == sd::SdState::OFF) {
sif::info << "Switching off SD card " << sdChar << std::endl;
return sdcMan->switchOffSdCard(sdCard, true, &sdInfo.currentState);
return sdcMan->switchOffSdCard(sdCard, sdInfo.currentState, true);
} else if (targetState == sd::SdState::ON) {
sif::info << "Unmounting SD card " << sdChar << std::endl;
return sdcMan->unmountSdCard(sdCard);
@ -881,7 +869,7 @@ ReturnValue_t CoreController::sdCardSetup(sd::SdCard sdCard, sd::SdState targetS
return sdcMan->mountSdCard(sdCard);
} else if (targetState == sd::SdState::OFF) {
sif::info << "Switching off SD card " << sdChar << std::endl;
return sdcMan->switchOffSdCard(sdCard, false, &sdInfo.currentState);
return sdcMan->switchOffSdCard(sdCard, sdInfo.currentState, false);
}
} else {
sif::warning << "CoreController::sdCardSetup: Invalid state for this call" << std::endl;
@ -905,8 +893,7 @@ ReturnValue_t CoreController::sdColdRedundantBlockingInit() {
sif::info << "Switching off secondary SD card " << sdInfo.otherChar << std::endl;
// Switch off other SD card in cold redundant mode if setting up preferred one worked
// without issues
ReturnValue_t result2 =
sdcMan->switchOffSdCard(sdInfo.other, sdInfo.otherState, &sdInfo.currentState);
ReturnValue_t result2 = sdcMan->switchOffSdCard(sdInfo.other, sdInfo.currentState, true);
if (result2 != returnvalue::OK and result2 != SdCardManager::ALREADY_OFF) {
sif::warning << "Switching off secondary SD card " << sdInfo.otherChar
<< " in cold redundant mode failed" << std::endl;
@ -1224,6 +1211,10 @@ ReturnValue_t CoreController::actionReboot(const uint8_t *data, size_t size) {
ReturnValue_t CoreController::gracefulShutdownTasks(xsc::Chip chip, xsc::Copy copy,
bool &protOpPerformed) {
// Store both sequence counters persistently.
core::SAVE_CFDP_SEQUENCE_COUNT = true;
core::SAVE_PUS_SEQUENCE_COUNT = true;
sdcMan->setBlocking(true);
sdcMan->markUnusable();
// Wait two seconds to ensure no one uses the SD cards
@ -1232,18 +1223,25 @@ ReturnValue_t CoreController::gracefulShutdownTasks(xsc::Chip chip, xsc::Copy co
// Ensure that all writes/reads do finish.
sync();
// Attempt graceful shutdown by unmounting and switching off SD cards
sdcMan->switchOffSdCard(sd::SdCard::SLOT_0);
sdcMan->switchOffSdCard(sd::SdCard::SLOT_1);
// If any boot copies are unprotected.
// Actually this function only ensures that reboots to the own image are protected..
ReturnValue_t result = setBootCopyProtection(xsc::Chip::SELF_CHIP, xsc::Copy::SELF_COPY, true,
protOpPerformed, false);
if (result == returnvalue::OK and protOpPerformed) {
// Unmount and switch off SD cards. This could possibly fix issues with the SD card and is
// the more graceful way to reboot the system. This function takes around 400 ms.
ReturnValue_t result = handleSwitchingSdCardsOffNonBlocking();
if (result != returnvalue::OK) {
sif::error
<< "CoreController::gracefulShutdownTasks: Issues unmounting or switching SD cards off"
<< std::endl;
}
// Ensure that the target chip is writeprotected in any case.
bool wasProtected = handleBootCopyProt(chip, copy, true);
if (wasProtected) {
// TODO: Would be nice to notify operator. But we can't use the filesystem anymore
// and a reboot is imminent. Use scratch buffer?
sif::info << "Running slot was writeprotected before reboot" << std::endl;
}
sif::info << "Graceful shutdown handling done" << std::endl;
// Ensure that all diagnostic prinouts arrive.
TaskFactory::delayTask(50);
return result;
}
@ -1277,144 +1275,50 @@ ReturnValue_t CoreController::generateChipStateFile() {
return returnvalue::OK;
}
ReturnValue_t CoreController::setBootCopyProtection(xsc::Chip targetChip, xsc::Copy targetCopy,
bool protect, bool &protOperationPerformed,
bool updateProtFile) {
bool allChips = false;
bool allCopies = false;
bool selfChip = false;
bool selfCopy = false;
protOperationPerformed = false;
switch (targetChip) {
case (xsc::Chip::ALL_CHIP): {
allChips = true;
break;
}
case (xsc::Chip::NO_CHIP): {
return returnvalue::OK;
}
case (xsc::Chip::SELF_CHIP): {
selfChip = true;
targetChip = CURRENT_CHIP;
break;
}
default: {
break;
}
}
switch (targetCopy) {
case (xsc::Copy::ALL_COPY): {
allCopies = true;
break;
}
case (xsc::Copy::NO_COPY): {
return returnvalue::OK;
}
case (xsc::Copy::SELF_COPY): {
selfCopy = true;
targetCopy = CURRENT_COPY;
break;
}
default: {
break;
}
ReturnValue_t CoreController::setBootCopyProtectionAndUpdateFile(xsc::Chip targetChip,
xsc::Copy targetCopy,
bool protect) {
if (targetChip == xsc::Chip::ALL_CHIP or targetCopy == xsc::Copy::ALL_COPY) {
return returnvalue::FAILED;
}
for (uint8_t arrIdx = 0; arrIdx < protArray.size(); arrIdx++) {
int result = handleBootCopyProtAtIndex(targetChip, targetCopy, protect, protOperationPerformed,
selfChip, selfCopy, allChips, allCopies, arrIdx);
if (result != 0) {
break;
}
}
if (protOperationPerformed and updateProtFile) {
bool protOperationPerformed = handleBootCopyProt(targetChip, targetCopy, protect);
if (protOperationPerformed) {
updateProtInfo();
}
return returnvalue::OK;
}
int CoreController::handleBootCopyProtAtIndex(xsc::Chip targetChip, xsc::Copy targetCopy,
bool protect, bool &protOperationPerformed,
bool selfChip, bool selfCopy, bool allChips,
bool allCopies, uint8_t arrIdx) {
bool currentProt = protArray[arrIdx];
bool CoreController::handleBootCopyProt(xsc::Chip targetChip, xsc::Copy targetCopy, bool protect) {
std::ostringstream oss;
bool performOp = false;
if (protect == currentProt) {
return 0;
}
if (protOperationPerformed) {
if ((selfChip and selfCopy) or (not allCopies and not allChips)) {
// No need to continue, only one operation was requested
return 1;
}
}
xsc::Chip currentChip;
xsc::Copy currentCopy;
oss << "writeprotect ";
if (arrIdx == 0 or arrIdx == 1) {
oss << "0 ";
currentChip = xsc::Chip::CHIP_0;
} else {
oss << "1 ";
currentChip = xsc::Chip::CHIP_1;
if (targetChip == xsc::Chip::SELF_CHIP) {
targetChip = CURRENT_CHIP;
}
if (arrIdx == 0 or arrIdx == 2) {
if (targetCopy == xsc::Copy::SELF_COPY) {
targetCopy = CURRENT_COPY;
}
if (targetChip == xsc::Chip::CHIP_0) {
oss << "0 ";
currentCopy = xsc::Copy::COPY_0;
} else {
} else if (targetChip == xsc::Chip::CHIP_1) {
oss << "1 ";
}
if (targetCopy == xsc::Copy::COPY_0) {
oss << "0 ";
} else if (targetCopy == xsc::Copy::COPY_1) {
oss << "1 ";
currentCopy = xsc::Copy::COPY_1;
}
if (protect) {
oss << "1";
} else {
oss << "0";
}
int result = 0;
if (allChips and allCopies) {
performOp = true;
} else if (allChips) {
if ((selfCopy and CURRENT_COPY == targetCopy) or (currentCopy == targetCopy)) {
performOp = true;
}
} else if (allCopies) {
if ((selfChip and CURRENT_COPY == targetCopy) or (currentChip == targetChip)) {
performOp = true;
}
} else if (selfChip and (currentChip == targetChip)) {
if (selfCopy) {
if (currentCopy == targetCopy) {
performOp = true;
}
} else {
performOp = true;
}
} else if (selfCopy and (currentCopy == targetCopy)) {
if (selfChip) {
if (currentChip == targetChip) {
performOp = true;
}
} else {
performOp = true;
}
} else if ((targetChip == currentChip) and (targetCopy == currentCopy)) {
performOp = true;
sif::info << "Executing command: " << oss.str() << std::endl;
int result = std::system(oss.str().c_str());
if (result == 0) {
return true;
}
if (result != 0) {
utility::handleSystemError(result, "CoreController::checkAndSetBootCopyProtection");
}
if (performOp) {
// TODO: Lock operation take a long time. Use command executor? That would require a
// new state machine..
protOperationPerformed = true;
sif::info << "Executing command: " << oss.str() << std::endl;
result = std::system(oss.str().c_str());
}
return 0;
return false;
}
ReturnValue_t CoreController::updateProtInfo(bool regenerateChipStateFile) {
@ -1459,7 +1363,6 @@ ReturnValue_t CoreController::handleProtInfoUpdateLine(std::string nextLine) {
using namespace std;
string word;
uint8_t wordIdx = 0;
uint8_t arrayIdx = 0;
istringstream iss(nextLine);
xsc::Chip currentChip = xsc::Chip::CHIP_0;
xsc::Copy currentCopy = xsc::Copy::COPY_0;
@ -1471,28 +1374,11 @@ ReturnValue_t CoreController::handleProtInfoUpdateLine(std::string nextLine) {
currentCopy = static_cast<xsc::Copy>(stoi(word));
}
if (wordIdx == 3) {
if (currentChip == xsc::Chip::CHIP_0) {
if (currentCopy == xsc::Copy::COPY_0) {
arrayIdx = 0;
} else if (currentCopy == xsc::Copy::COPY_1) {
arrayIdx = 1;
}
}
else if (currentChip == xsc::Chip::CHIP_1) {
if (currentCopy == xsc::Copy::COPY_0) {
arrayIdx = 2;
} else if (currentCopy == xsc::Copy::COPY_1) {
arrayIdx = 3;
}
}
}
if (wordIdx == 5) {
if (word == "unlocked.") {
protArray[arrayIdx] = false;
protArray[currentChip][currentCopy] = false;
} else {
protArray[arrayIdx] = true;
protArray[currentChip][currentCopy] = true;
}
}
wordIdx++;
@ -2520,14 +2406,10 @@ void CoreController::announceVersionInfo() {
}
triggerEvent(VERSION_INFO, p1, p2);
if (common::OBSW_VERSION_MAJOR >= 6 or common::OBSW_VERSION_MAJOR == 4) {
if (mappedSysRomAddr != nullptr) {
uint32_t p1Firmware = *(reinterpret_cast<uint32_t *>(mappedSysRomAddr));
uint32_t p2Firmware = *(reinterpret_cast<uint32_t *>(mappedSysRomAddr) + 1);
triggerEvent(FIRMWARE_INFO, p1Firmware, p2Firmware);
}
}
p1 = (core::FW_VERSION_MAJOR << 24) | (core::FW_VERSION_MINOR << 16) |
(core::FW_VERSION_REVISION << 8) | (core::FW_VERSION_HAS_SHA);
std::memcpy(&p2, core::FW_VERSION_GIT_SHA, 4);
triggerEvent(FIRMWARE_INFO, p1, p2);
}
void CoreController::announceCurrentImageInfo() {
@ -2579,6 +2461,68 @@ ReturnValue_t CoreController::performGracefulShutdown(xsc::Chip tgtChip, xsc::Co
return returnvalue::OK;
}
void CoreController::announceSdInfo(SdCardManager::SdStatePair sdStates) {
auto activeSdCard = sdcMan->getActiveSdCard();
uint32_t p1 = sd::SdCard::NONE;
if (activeSdCard.has_value()) {
p1 = static_cast<uint32_t>(activeSdCard.value());
}
uint32_t p2 =
(static_cast<uint32_t>(sdStates.first) << 16) | static_cast<uint32_t>(sdStates.second);
triggerEvent(core::ACTIVE_SD_INFO, p1, p2);
}
ReturnValue_t CoreController::handleSwitchingSdCardsOffNonBlocking() {
sdcMan->setBlocking(false);
SdCardManager::Operations op;
std::pair<sd::SdState, sd::SdState> sdStatus;
ReturnValue_t result = sdcMan->getSdCardsStatus(sdStatus);
if (result != returnvalue::OK) {
return result;
}
Countdown maxWaitTimeCd(10000);
// Stopwatch watch;
auto waitingForFinish = [&]() {
auto currentState = sdcMan->checkCurrentOp(op);
if (currentState == SdCardManager::OpStatus::IDLE) {
return returnvalue::OK;
}
while (currentState == SdCardManager::OpStatus::ONGOING) {
if (maxWaitTimeCd.hasTimedOut()) {
return returnvalue::FAILED;
}
TaskFactory::delayTask(50);
currentState = sdcMan->checkCurrentOp(op);
}
return returnvalue::OK;
};
if (sdStatus.first != sd::SdState::OFF) {
sdcMan->unmountSdCard(sd::SdCard::SLOT_0);
result = waitingForFinish();
if (result != returnvalue::OK) {
return result;
}
sdcMan->switchOffSdCard(sd::SdCard::SLOT_0, sdStatus, false);
result = waitingForFinish();
if (result != returnvalue::OK) {
return result;
}
}
if (sdStatus.second != sd::SdState::OFF) {
sdcMan->unmountSdCard(sd::SdCard::SLOT_1);
result = waitingForFinish();
if (result != returnvalue::OK) {
return result;
}
sdcMan->switchOffSdCard(sd::SdCard::SLOT_1, sdStatus, false);
result = waitingForFinish();
if (result != returnvalue::OK) {
return result;
}
}
return result;
}
bool CoreController::isNumber(const std::string &s) {
return !s.empty() && std::find_if(s.begin(), s.end(),
[](unsigned char c) { return !std::isdigit(c); }) == s.end();

View File

@ -1,6 +1,7 @@
#ifndef BSP_Q7S_CORE_CORECONTROLLER_H_
#define BSP_Q7S_CORE_CORECONTROLLER_H_
#include <bsp_q7s/core/defs.h>
#include <fsfw/container/DynamicFIFO.h>
#include <fsfw/container/SimpleRingBuffer.h>
#include <fsfw/globalfunctions/PeriodicOperationDivider.h>
@ -14,7 +15,6 @@
#include <atomic>
#include <cstddef>
#include "CoreDefinitions.h"
#include "OBSWConfig.h"
#include "bsp_q7s/fs/SdCardManager.h"
#include "events/subsystemIdRanges.h"
@ -199,8 +199,8 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe
* @param updateProtFile Specify whether the protection info file is updated
* @return
*/
ReturnValue_t setBootCopyProtection(xsc::Chip targetChip, xsc::Copy targetCopy, bool protect,
bool& protOperationPerformed, bool updateProtFile = true);
ReturnValue_t setBootCopyProtectionAndUpdateFile(xsc::Chip targetChip, xsc::Copy targetCopy,
bool protect);
bool sdInitFinished() const;
@ -304,12 +304,10 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe
Countdown sdCardCheckCd = Countdown(INIT_SD_CARD_CHECK_TIMEOUT);
/**
* Index 0: Chip 0 Copy 0
* Index 1: Chip 0 Copy 1
* Index 2: Chip 1 Copy 0
* Index 3: Chip 1 Copy 1
* First index: Chip.
* Second index: Copy.
*/
std::array<bool, 4> protArray;
bool protArray[2][2]{};
PeriodicOperationDivider opDivider5;
PeriodicOperationDivider opDivider10;
@ -374,9 +372,8 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe
ReturnValue_t gracefulShutdownTasks(xsc::Chip chip, xsc::Copy copy, bool& protOpPerformed);
ReturnValue_t handleProtInfoUpdateLine(std::string nextLine);
int handleBootCopyProtAtIndex(xsc::Chip targetChip, xsc::Copy targetCopy, bool protect,
bool& protOperationPerformed, bool selfChip, bool selfCopy,
bool allChips, bool allCopies, uint8_t arrIdx);
ReturnValue_t handleSwitchingSdCardsOffNonBlocking();
bool handleBootCopyProt(xsc::Chip targetChip, xsc::Copy targetCopy, bool protect);
void rebootWatchdogAlgorithm(RebootWatchdogFile& rf, bool& needsReboot, xsc::Chip& tgtChip,
xsc::Copy& tgtCopy);
void resetRebootWatchdogCounters(xsc::Chip tgtChip, xsc::Copy tgtCopy);
@ -388,6 +385,7 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe
void announceBootCounts();
void announceVersionInfo();
void announceCurrentImageInfo();
void announceSdInfo(SdCardManager::SdStatePair sdStates);
void readHkData();
void dirListingDumpHandler();
bool isNumber(const std::string& s);

View File

@ -1,10 +1,16 @@
#ifndef BSP_Q7S_CORE_COREDEFINITIONS_H_
#define BSP_Q7S_CORE_COREDEFINITIONS_H_
#ifndef BSP_Q7S_CORE_DEFS_H_
#define BSP_Q7S_CORE_DEFS_H_
#include <fsfw/datapoollocal/StaticLocalDataSet.h>
namespace core {
extern uint8_t FW_VERSION_MAJOR;
extern uint8_t FW_VERSION_MINOR;
extern uint8_t FW_VERSION_REVISION;
extern bool FW_VERSION_HAS_SHA;
extern char FW_VERSION_GIT_SHA[4];
static const uint8_t HK_SET_ENTRIES = 3;
static const uint32_t HK_SET_ID = 5;
@ -36,4 +42,4 @@ class HkSet : public StaticLocalDataSet<HK_SET_ENTRIES> {
} // namespace core
#endif /* BSP_Q7S_CORE_COREDEFINITIONS_H_ */
#endif /* BSP_Q7S_CORE_DEFS_H_ */

View File

@ -1,4 +1,5 @@
#include <bsp_q7s/callbacks/q7sGpioCallbacks.h>
#include <bsp_q7s/objectFactory.h>
#include <dummies/ComCookieDummy.h>
#include <dummies/PcduHandlerDummy.h>
#include <fsfw/health/HealthTableIF.h>
@ -10,8 +11,8 @@
#include "OBSWConfig.h"
#include "bsp_q7s/core/CoreController.h"
#include "bsp_q7s/core/ObjectFactory.h"
#include "busConf.h"
#include "common/config/devices/addresses.h"
#include "devConf.h"
#include "dummies/helperFactory.h"
#include "eive/objects.h"
@ -35,16 +36,17 @@ void ObjectFactory::produce(void* args) {
#endif
PersistentTmStores stores;
readFirmwareVersion();
ObjectFactory::produceGenericObjects(&healthTable, &pusFunnel, &cfdpFunnel,
*SdCardManager::instance(), &ipcStore, &tmStore, stores,
200);
*SdCardManager::instance(), &ipcStore, &tmStore, stores, 200,
enableHkSets);
LinuxLibgpioIF* gpioComIF = nullptr;
SerialComIF* uartComIF = nullptr;
SpiComIF* spiMainComIF = nullptr;
I2cComIF* i2cComIF = nullptr;
createCommunicationInterfaces(&gpioComIF, &uartComIF, &spiMainComIF, &i2cComIF);
/* Adding gpios for chip select decoding to the gpioComIf */
// Adding GPIOs for chip select decoding and initializing them.
q7s::gpioCallbacks::initSpiCsDecoder(gpioComIF);
gpioCallbacks::disableAllDecoder(gpioComIF);
createPlI2cResetGpio(gpioComIF);
@ -60,17 +62,41 @@ void ObjectFactory::produce(void* args) {
#if OBSW_ADD_PLOC_SUPERVISOR == 1 || OBSW_ADD_PLOC_MPSOC == 1
dummyCfg.addPlocDummies = false;
#endif
#if OBSW_ADD_TMP_DEVICES == 1
std::vector<std::pair<object_id_t, address_t>> tmpDevsToAdd = {{
{objects::TMP1075_HANDLER_PLPCDU_0, addresses::TMP1075_PLPCDU_0},
{objects::TMP1075_HANDLER_PLPCDU_1, addresses::TMP1075_PLPCDU_1},
{objects::TMP1075_HANDLER_IF_BOARD, addresses::TMP1075_IF_BOARD},
}};
createTmpComponents(tmpDevsToAdd);
dummy::Tmp1075Cfg tmpCfg{};
tmpCfg.addTcsBrd0 = true;
tmpCfg.addTcsBrd1 = true;
tmpCfg.addPlPcdu0 = false;
tmpCfg.addPlPcdu1 = false;
tmpCfg.addIfBrd = false;
dummyCfg.tmp1075Cfg = tmpCfg;
#endif
#if OBSW_ADD_GOMSPACE_PCDU == 1
dummyCfg.addPowerDummies = false;
// The ACU broke.
dummyCfg.addOnlyAcuDummy = true;
#endif
#if OBSW_ADD_STAR_TRACKER == 1
dummyCfg.addStrDummy = false;
#endif
#if OBSW_ADD_SCEX_DEVICE == 0
dummyCfg.addScexDummy = true;
#endif
#if OBSW_ADD_BPX_BATTERY_HANDLER == 1
dummyCfg.addBpxBattDummy = false;
#endif
#if OBSW_ADD_ACS_BOARD == 1
dummyCfg.addAcsBoardDummies = false;
#endif
#if OBSW_ADD_PL_PCDU == 0
dummyCfg.addPlPcduDummy = true;
#endif
PowerSwitchIF* pwrSwitcher = nullptr;
#if OBSW_ADD_GOMSPACE_PCDU == 0
@ -84,9 +110,13 @@ void ObjectFactory::produce(void* args) {
new CoreController(objects::CORE_CONTROLLER, enableHkSets);
#if OBSW_ADD_ACS_BOARD == 1
// Still initialize chip select to avoid SPI bus issues.
auto* stackHandler = new Stack5VHandler(*pwrSwitcher);
static_cast<void>(stackHandler);
// Initialize chip select to avoid SPI bus issues.
createRadSensorChipSelect(gpioComIF);
#if OBSW_ADD_ACS_BOARD == 1
createAcsBoardComponents(*spiMainComIF, gpioComIF, uartComIF, *pwrSwitcher, true,
adis1650x::Type::ADIS16507);
#else
@ -96,8 +126,14 @@ void ObjectFactory::produce(void* args) {
gpioChecker(gpioComIF->addGpios(acsBoardGpios), "ACS Board");
#endif
const char* battAndImtqI2cDev = q7s::I2C_PL_EIVE;
if (core::FW_VERSION_MAJOR >= 4) {
battAndImtqI2cDev = q7s::I2C_PS_EIVE;
}
static_cast<void>(battAndImtqI2cDev);
#if OBSW_ADD_MGT == 1
createImtqComponents(pwrSwitcher, enableHkSets);
createImtqComponents(pwrSwitcher, enableHkSets, battAndImtqI2cDev);
#endif
#if OBSW_ADD_SYRLINKS == 1
@ -109,13 +145,16 @@ void ObjectFactory::produce(void* args) {
#endif
#if OBSW_ADD_BPX_BATTERY_HANDLER == 1
createBpxBatteryComponent(enableHkSets);
createBpxBatteryComponent(enableHkSets, battAndImtqI2cDev);
#endif
#if OBSW_ADD_STAR_TRACKER == 1
createStrComponents(pwrSwitcher);
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
#if OBSW_ADD_PL_PCDU == 1
createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher, *stackHandler);
#endif
createPayloadComponents(gpioComIF, *pwrSwitcher);
#if OBSW_ADD_CCSDS_IP_CORES == 1
@ -141,6 +180,6 @@ void ObjectFactory::produce(void* args) {
createAcsController(true, enableHkSets);
HeaterHandler* heaterHandler;
createHeaterComponents(gpioComIF, pwrSwitcher, healthTable, heaterHandler);
createThermalController(*heaterHandler);
satsystem::init();
createThermalController(*heaterHandler, true);
satsystem::init(true);
}

View File

@ -1,4 +1,5 @@
#include <bsp_q7s/callbacks/q7sGpioCallbacks.h>
#include <bsp_q7s/objectFactory.h>
#include <devices/gpioIds.h>
#include <fsfw/storagemanager/LocalPool.h>
#include <fsfw/storagemanager/PoolManager.h>
@ -7,9 +8,9 @@
#include "OBSWConfig.h"
#include "bsp_q7s/core/CoreController.h"
#include "bsp_q7s/core/ObjectFactory.h"
#include "busConf.h"
#include "devConf.h"
#include "devices/addresses.h"
#include "eive/objects.h"
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
#include "linux/ObjectFactory.h"
@ -32,9 +33,10 @@ void ObjectFactory::produce(void* args) {
#endif
PersistentTmStores stores;
readFirmwareVersion();
ObjectFactory::produceGenericObjects(&healthTable, &pusFunnel, &cfdpFunnel,
*SdCardManager::instance(), &ipcStore, &tmStore, stores,
200);
*SdCardManager::instance(), &ipcStore, &tmStore, stores, 200,
true);
LinuxLibgpioIF* gpioComIF = nullptr;
SerialComIF* uartComIF = nullptr;
@ -67,23 +69,38 @@ void ObjectFactory::produce(void* args) {
HeaterHandler* heaterHandler;
createHeaterComponents(gpioComIF, pwrSwitcher, healthTable, heaterHandler);
#if OBSW_ADD_TMP_DEVICES == 1
createTmpComponents();
std::vector<std::pair<object_id_t, address_t>> tmpDevsToAdd = {{
{objects::TMP1075_HANDLER_TCS_0, addresses::TMP1075_TCS_0},
{objects::TMP1075_HANDLER_TCS_1, addresses::TMP1075_TCS_1},
{objects::TMP1075_HANDLER_PLPCDU_0, addresses::TMP1075_PLPCDU_0},
// damaged
// {objects::TMP1075_HANDLER_PLPCDU_1, addresses::TMP1075_PLPCDU_1},
{objects::TMP1075_HANDLER_IF_BOARD, addresses::TMP1075_IF_BOARD},
}};
createTmpComponents(tmpDevsToAdd);
#endif
createSolarArrayDeploymentComponents(*pwrSwitcher, *gpioComIF);
#if OBSW_ADD_PL_PCDU == 1
createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher, *stackHandler);
#endif
#if OBSW_ADD_SYRLINKS == 1
createSyrlinksComponents(pwrSwitcher);
#endif /* OBSW_ADD_SYRLINKS == 1 */
createRtdComponents(q7s::SPI_DEFAULT_DEV, gpioComIF, pwrSwitcher, spiMainComIF);
createPayloadComponents(gpioComIF, *pwrSwitcher);
const char* battAndImtqI2cDev = q7s::I2C_PL_EIVE;
if (core::FW_VERSION_MAJOR >= 4) {
battAndImtqI2cDev = q7s::I2C_PS_EIVE;
}
#if OBSW_ADD_MGT == 1
createImtqComponents(pwrSwitcher, enableHkSets);
createImtqComponents(pwrSwitcher, enableHkSets, battAndImtqI2cDev);
#endif
createReactionWheelComponents(gpioComIF, pwrSwitcher);
#if OBSW_ADD_BPX_BATTERY_HANDLER == 1
createBpxBatteryComponent(enableHkSets);
createBpxBatteryComponent(enableHkSets, battAndImtqI2cDev);
#endif
#if OBSW_ADD_STAR_TRACKER == 1
@ -113,7 +130,7 @@ void ObjectFactory::produce(void* args) {
#endif /* OBSW_ADD_TEST_CODE == 1 */
createMiscComponents();
createThermalController(*heaterHandler);
createThermalController(*heaterHandler, false);
createAcsController(true, enableHkSets);
satsystem::init();
satsystem::init(false);
}

View File

@ -125,13 +125,8 @@ ReturnValue_t SdCardManager::switchOnSdCard(sd::SdCard sdCard, bool doMountSdCar
return mountSdCard(sdCard);
}
ReturnValue_t SdCardManager::switchOffSdCard(sd::SdCard sdCard, bool doUnmountSdCard,
SdStatePair* statusPair) {
std::pair<sd::SdState, sd::SdState> active;
ReturnValue_t result = getSdCardsStatus(active);
if (result != returnvalue::OK) {
return result;
}
ReturnValue_t SdCardManager::switchOffSdCard(sd::SdCard sdCard, SdStatePair& sdStates,
bool doUnmountSdCard) {
if (doUnmountSdCard) {
if (not blocking) {
sif::warning << "SdCardManager::switchOffSdCard: Two-step command but manager is"
@ -147,17 +142,17 @@ ReturnValue_t SdCardManager::switchOffSdCard(sd::SdCard sdCard, bool doUnmountSd
return returnvalue::FAILED;
}
if (sdCard == sd::SdCard::SLOT_0) {
if (active.first == sd::SdState::OFF) {
if (sdStates.first == sd::SdState::OFF) {
return ALREADY_OFF;
}
} else if (sdCard == sd::SdCard::SLOT_1) {
if (active.second == sd::SdState::OFF) {
if (sdStates.second == sd::SdState::OFF) {
return ALREADY_OFF;
}
}
if (doUnmountSdCard) {
result = unmountSdCard(sdCard);
ReturnValue_t result = unmountSdCard(sdCard);
if (result != returnvalue::OK) {
return result;
}
@ -189,7 +184,7 @@ ReturnValue_t SdCardManager::setSdCardState(sd::SdCard sdCard, bool on) {
command << "q7hw sd set " << sdstring << " " << statestring;
cmdExecutor.load(command.str(), blocking, printCmdOutput);
ReturnValue_t result = cmdExecutor.execute();
if (blocking and result != returnvalue::OK) {
if (result != returnvalue::OK) {
utility::handleSystemError(cmdExecutor.getLastError(), "SdCardManager::setSdCardState");
}
return result;
@ -204,6 +199,7 @@ ReturnValue_t SdCardManager::getSdCardsStatus(SdStatePair& sdStates) {
ReturnValue_t SdCardManager::mountSdCard(sd::SdCard sdCard) {
using namespace std;
if (cmdExecutor.getCurrentState() == CommandExecutor::States::PENDING) {
sif::warning << "SdCardManager::mountSdCard: Command still pending" << std::endl;
return CommandExecutor::COMMAND_PENDING;
}
if (sdCard == sd::SdCard::BOTH) {

View File

@ -114,8 +114,7 @@ class SdCardManager : public SystemObject, public SdCardMountedIF {
* @return - returnvalue::OK on success, ALREADY_ON if it is already on,
* SYSTEM_CALL_ERROR on system error
*/
ReturnValue_t switchOffSdCard(sd::SdCard sdCard, bool doUnmountSdCard = true,
SdStatePair* statusPair = nullptr);
ReturnValue_t switchOffSdCard(sd::SdCard sdCard, SdStatePair& sdStates, bool doUnmountSdCard);
/**
* Get the state of the SD cards. If the state file does not exist, this function will

View File

@ -1,8 +1,9 @@
#include "ObjectFactory.h"
#include "objectFactory.h"
#include <fsfw/devicehandlers/HealthDevice.h>
#include <fsfw/subsystem/Subsystem.h>
#include <fsfw/tasks/TaskFactory.h>
#include <fsfw_hal/linux/uio/UioMapper.h>
#include <linux/acs/AcsBoardPolling.h>
#include <linux/acs/GpsHyperionLinuxController.h>
#include <linux/acs/ImtqPollingTask.h>
@ -32,6 +33,9 @@
#include <mission/system/objects/CamSwitcher.h>
#include <mission/system/tcs/TmpDevFdir.h>
#include <cstdint>
#include <cstring>
#include "OBSWConfig.h"
#include "bsp_q7s/boardtest/Q7STestTask.h"
#include "bsp_q7s/callbacks/gnssCallback.h"
@ -100,6 +104,7 @@
#include <sstream>
#include "bsp_q7s/core/defs.h"
#include "fsfw/datapoollocal/LocalDataPoolManager.h"
#include "fsfw/tmtcpacket/pus/tm.h"
#include "fsfw/tmtcservices/CommandingServiceBase.h"
@ -130,6 +135,11 @@ ResetArgs RESET_ARGS_GNSS;
std::atomic_bool LINK_STATE = CcsdsIpCoreHandler::LINK_DOWN;
std::atomic_bool PTME_LOCKED = false;
std::atomic_uint16_t I2C_FATAL_ERRORS = 0;
uint8_t core::FW_VERSION_MAJOR = 0;
uint8_t core::FW_VERSION_MINOR = 0;
uint8_t core::FW_VERSION_REVISION = 0;
bool core::FW_VERSION_HAS_SHA = false;
char core::FW_VERSION_GIT_SHA[4] = {};
void Factory::setStaticFrameworkObjectIds() {
PusServiceBase::PUS_DISTRIBUTOR = objects::PUS_PACKET_DISTRIBUTOR;
@ -151,28 +161,23 @@ void Factory::setStaticFrameworkObjectIds() {
void ObjectFactory::setStatics() { Factory::setStaticFrameworkObjectIds(); }
void ObjectFactory::createTmpComponents() {
std::vector<std::pair<object_id_t, address_t>> tmpDevIds = {{
{objects::TMP1075_HANDLER_TCS_0, addresses::TMP1075_TCS_0},
{objects::TMP1075_HANDLER_TCS_1, addresses::TMP1075_TCS_1},
{objects::TMP1075_HANDLER_PLPCDU_0, addresses::TMP1075_PLPCDU_0},
// damaged
// {objects::TMP1075_HANDLER_PLPCDU_1, addresses::TMP1075_PLPCDU_1},
{objects::TMP1075_HANDLER_IF_BOARD, addresses::TMP1075_IF_BOARD},
}};
void ObjectFactory::createTmpComponents(
std::vector<std::pair<object_id_t, address_t>> tmpDevsToAdd) {
const char* tmpI2cDev = q7s::I2C_PS_EIVE;
if (core::FW_VERSION_MAJOR == 4) {
tmpI2cDev = q7s::I2C_PL_EIVE;
} else if (core::FW_VERSION_MAJOR >= 5) {
tmpI2cDev = q7s::I2C_Q7_EIVE;
}
std::vector<I2cCookie*> tmpDevCookies;
for (size_t idx = 0; idx < tmpDevIds.size(); idx++) {
for (size_t idx = 0; idx < tmpDevsToAdd.size(); idx++) {
tmpDevCookies.push_back(
new I2cCookie(tmpDevIds[idx].second, TMP1075::MAX_REPLY_LENGTH, q7s::I2C_PS_EIVE));
new I2cCookie(tmpDevsToAdd[idx].second, TMP1075::MAX_REPLY_LENGTH, tmpI2cDev));
auto* tmpDevHandler =
new Tmp1075Handler(tmpDevIds[idx].first, objects::I2C_COM_IF, tmpDevCookies[idx]);
tmpDevHandler->setCustomFdir(new TmpDevFdir(tmpDevIds[idx].first));
new Tmp1075Handler(tmpDevsToAdd[idx].first, objects::I2C_COM_IF, tmpDevCookies[idx]);
tmpDevHandler->setCustomFdir(new TmpDevFdir(tmpDevsToAdd[idx].first));
tmpDevHandler->connectModeTreeParent(satsystem::tcs::SUBSYSTEM);
// TODO: Remove this after TCS subsystem was added
// These devices are connected to the 3V3 stack and should be powered permanently. Therefore,
// we set them to normal mode immediately here.
tmpDevHandler->setModeNormal();
}
}
@ -244,7 +249,7 @@ ReturnValue_t ObjectFactory::createRadSensorComponent(LinuxLibgpioIF* gpioComIF,
createRadSensorChipSelect(gpioComIF);
SpiCookie* spiCookieRadSensor =
new SpiCookie(addresses::RAD_SENSOR, gpioIds::CS_RAD_SENSOR, RAD_SENSOR::READ_SIZE,
new SpiCookie(addresses::RAD_SENSOR, gpioIds::CS_RAD_SENSOR, radSens::READ_SIZE,
spi::DEFAULT_MAX_1227_MODE, spi::DEFAULT_MAX_1227_SPEED);
spiCookieRadSensor->setMutexParams(MutexIF::TimeoutType::WAITING, spi::RAD_SENSOR_CS_TIMEOUT);
auto radSensor = new RadiationSensorHandler(objects::RAD_SENSOR, objects::SPI_MAIN_COM_IF,
@ -731,20 +736,12 @@ ReturnValue_t ObjectFactory::createCcsdsComponents(CcsdsComponentArgs& args) {
// GPIO definitions of signals connected to the virtual channel interfaces of the PTME IP Core
GpioCookie* gpioCookiePtmeIp = new GpioCookie;
GpiodRegularByLineName* gpio = nullptr;
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_BUSY_SIGNAL_VC0, "PAPB VC0");
gpioCookiePtmeIp->addGpio(gpioIds::VC0_PAPB_BUSY, gpio);
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC0, "PAPB VC0");
gpioCookiePtmeIp->addGpio(gpioIds::VC0_PAPB_EMPTY, gpio);
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_BUSY_SIGNAL_VC1, "PAPB VC1");
gpioCookiePtmeIp->addGpio(gpioIds::VC1_PAPB_BUSY, gpio);
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC1, "PAPB VC1");
gpioCookiePtmeIp->addGpio(gpioIds::VC1_PAPB_EMPTY, gpio);
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_BUSY_SIGNAL_VC2, "PAPB VC2");
gpioCookiePtmeIp->addGpio(gpioIds::VC2_PAPB_BUSY, gpio);
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC2, "PAPB VC2");
gpioCookiePtmeIp->addGpio(gpioIds::VC2_PAPB_EMPTY, gpio);
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_BUSY_SIGNAL_VC3, "PAPB VC3");
gpioCookiePtmeIp->addGpio(gpioIds::VC3_PAPB_BUSY, gpio);
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC3, "PAPB VC3");
gpioCookiePtmeIp->addGpio(gpioIds::VC3_PAPB_EMPTY, gpio);
gpio = new GpiodRegularByLineName(q7s::gpioNames::PTME_RESETN, "PTME RESETN",
@ -753,19 +750,14 @@ ReturnValue_t ObjectFactory::createCcsdsComponents(CcsdsComponentArgs& args) {
gpioChecker(args.gpioComIF.addGpios(gpioCookiePtmeIp), "PTME PAPB VCs");
// Creating virtual channel interfaces
VirtualChannelIF* vc0 =
new PapbVcInterface(&args.gpioComIF, gpioIds::VC0_PAPB_BUSY, gpioIds::VC0_PAPB_EMPTY,
q7s::UIO_PTME, q7s::uiomapids::PTME_VC0);
VirtualChannelIF* vc1 =
new PapbVcInterface(&args.gpioComIF, gpioIds::VC1_PAPB_BUSY, gpioIds::VC1_PAPB_EMPTY,
q7s::UIO_PTME, q7s::uiomapids::PTME_VC1);
VirtualChannelIF* vc2 =
new PapbVcInterface(&args.gpioComIF, gpioIds::VC2_PAPB_BUSY, gpioIds::VC2_PAPB_EMPTY,
q7s::UIO_PTME, q7s::uiomapids::PTME_VC2);
VirtualChannelIF* vc3 =
new PapbVcInterface(&args.gpioComIF, gpioIds::VC3_PAPB_BUSY, gpioIds::VC3_PAPB_EMPTY,
q7s::UIO_PTME, q7s::uiomapids::PTME_VC3);
VirtualChannelIF* vc0 = new PapbVcInterface(&args.gpioComIF, gpioIds::VC0_PAPB_EMPTY,
q7s::UIO_PTME, q7s::uiomapids::PTME_VC0);
VirtualChannelIF* vc1 = new PapbVcInterface(&args.gpioComIF, gpioIds::VC1_PAPB_EMPTY,
q7s::UIO_PTME, q7s::uiomapids::PTME_VC1);
VirtualChannelIF* vc2 = new PapbVcInterface(&args.gpioComIF, gpioIds::VC2_PAPB_EMPTY,
q7s::UIO_PTME, q7s::uiomapids::PTME_VC2);
VirtualChannelIF* vc3 = new PapbVcInterface(&args.gpioComIF, gpioIds::VC3_PAPB_EMPTY,
q7s::UIO_PTME, q7s::uiomapids::PTME_VC3);
// Creating ptme object and adding virtual channel interfaces
Ptme* ptme = new Ptme(objects::PTME);
ptme->addVcInterface(ccsds::VC0, vc0);
@ -910,8 +902,6 @@ void ObjectFactory::createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF*
new PayloadPcduHandler(objects::PLPCDU_HANDLER, objects::SPI_MAIN_COM_IF, spiCookie,
gpioComIF, SdCardManager::instance(), stackHandler, false);
spiCookie->setCallbackMode(PayloadPcduHandler::extConvAsTwoCallback, plPcduHandler);
// plPcduHandler->enablePeriodicPrintout(true, 5);
// static_cast<void>(plPcduHandler);
#if OBSW_TEST_PL_PCDU == 1
plPcduHandler->setStartUpImmediately();
#endif
@ -945,16 +935,7 @@ void ObjectFactory::createStrComponents(PowerSwitchIF* pwrSwitcher) {
starTrackerCookie->setNoFixedSizeReply();
StrComHandler* strComIF = new StrComHandler(objects::STR_COM_IF);
const char* paramJsonFile = nullptr;
#ifdef EGSE
paramJsonFile = "/home/pi/arcsec/json/flight-config.json";
#else
#if OBSW_STAR_TRACKER_GROUND_CONFIG == 1
paramJsonFile = "/mnt/sd0/startracker/ground-config.json";
#else
paramJsonFile = "/mnt/sd0/startracker/flight-config.json";
#endif
#endif
const char* paramJsonFile = "/mnt/sd0/startracker/flight-config.json";
if (paramJsonFile == nullptr) {
sif::error << "No valid Star Tracker parameter JSON file" << std::endl;
}
@ -967,12 +948,13 @@ void ObjectFactory::createStrComponents(PowerSwitchIF* pwrSwitcher) {
starTracker->setCustomFdir(strFdir);
}
void ObjectFactory::createImtqComponents(PowerSwitchIF* pwrSwitcher, bool enableHkSets) {
void ObjectFactory::createImtqComponents(PowerSwitchIF* pwrSwitcher, bool enableHkSets,
const char* i2cDev) {
auto* imtqAssy = new ImtqAssembly(objects::IMTQ_ASSY);
imtqAssy->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM);
new ImtqPollingTask(objects::IMTQ_POLLING, I2C_FATAL_ERRORS);
I2cCookie* imtqI2cCookie = new I2cCookie(addresses::IMTQ, imtq::MAX_REPLY_SIZE, q7s::I2C_PL_EIVE);
I2cCookie* imtqI2cCookie = new I2cCookie(addresses::IMTQ, imtq::MAX_REPLY_SIZE, i2cDev);
auto imtqHandler = new ImtqHandler(objects::IMTQ_HANDLER, objects::IMTQ_POLLING, imtqI2cCookie,
power::Switches::PDU1_CH3_MGT_5V, enableHkSets);
imtqHandler->enableThermalModule(ThermalStateCfg());
@ -988,8 +970,8 @@ void ObjectFactory::createImtqComponents(PowerSwitchIF* pwrSwitcher, bool enable
#endif
}
void ObjectFactory::createBpxBatteryComponent(bool enableHkSets) {
I2cCookie* bpxI2cCookie = new I2cCookie(addresses::BPX_BATTERY, 100, q7s::I2C_PL_EIVE);
void ObjectFactory::createBpxBatteryComponent(bool enableHkSets, const char* i2cDev) {
I2cCookie* bpxI2cCookie = new I2cCookie(addresses::BPX_BATTERY, 100, i2cDev);
BpxBatteryHandler* bpxHandler = new BpxBatteryHandler(
objects::BPX_BATT_HANDLER, objects::I2C_COM_IF, bpxI2cCookie, enableHkSets);
bpxHandler->setStartUpImmediately();
@ -1045,3 +1027,32 @@ void ObjectFactory::createPlI2cResetGpio(LinuxLibgpioIF* gpioIF) {
gpioIF->pullHigh(gpioIds::PL_I2C_ARESETN);
}
}
ReturnValue_t ObjectFactory::readFirmwareVersion() {
uint32_t* mappedSysRomAddr = nullptr;
// The SYS ROM FPGA block is only available in those versions.
if (not(common::OBSW_VERSION_MAJOR >= 6) or (common::OBSW_VERSION_MAJOR == 4)) {
return returnvalue::OK;
}
// This has to come before the version announce because it might be required for retrieving
// the firmware version.
UioMapper sysRomMapper(q7s::UIO_SYS_ROM);
ReturnValue_t result =
sysRomMapper.getMappedAdress(&mappedSysRomAddr, UioMapper::Permissions::READ_ONLY);
if (result != returnvalue::OK) {
sif::error << "Getting mapped SYS ROM UIO address failed" << std::endl;
return returnvalue::FAILED;
}
if (mappedSysRomAddr != nullptr) {
uint32_t firstEntry = *(reinterpret_cast<uint32_t*>(mappedSysRomAddr));
uint32_t secondEntry = *(reinterpret_cast<uint32_t*>(mappedSysRomAddr) + 1);
core::FW_VERSION_MAJOR = (firstEntry >> 24) & 0xff;
core::FW_VERSION_MINOR = (firstEntry >> 16) & 0xff;
core::FW_VERSION_REVISION = (firstEntry >> 8) & 0xff;
bool hasGitSha = (firstEntry & 0x0b1);
if (hasGitSha) {
std::memcpy(core::FW_VERSION_GIT_SHA, &secondEntry, 4);
}
}
return returnvalue::OK;
}

View File

@ -58,7 +58,7 @@ void createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF** pwrSwitcher
bool enableHkSets);
void createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF,
PowerSwitchIF* pwrSwitcher, Stack5VHandler& stackHandler);
void createTmpComponents();
void createTmpComponents(std::vector<std::pair<object_id_t, address_t>> tmpDevsToAdd);
void createRadSensorChipSelect(LinuxLibgpioIF* gpioIF);
ReturnValue_t createRadSensorComponent(LinuxLibgpioIF* gpioComIF, Stack5VHandler& handler);
void createAcsBoardGpios(GpioCookie& cookie);
@ -67,14 +67,15 @@ void createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF* gpioComIF, Ser
adis1650x::Type adisType);
void createHeaterComponents(GpioIF* gpioIF, PowerSwitchIF* pwrSwitcher, HealthTableIF* healthTable,
HeaterHandler*& heaterHandler);
void createImtqComponents(PowerSwitchIF* pwrSwitcher, bool enableHkSets);
void createBpxBatteryComponent(bool enableHkSets);
void createImtqComponents(PowerSwitchIF* pwrSwitcher, bool enableHkSets, const char* i2cDev);
void createBpxBatteryComponent(bool enableHkSets, const char* i2cDev);
void createStrComponents(PowerSwitchIF* pwrSwitcher);
void createSolarArrayDeploymentComponents(PowerSwitchIF& pwrSwitcher, GpioIF& gpioIF);
void createSyrlinksComponents(PowerSwitchIF* pwrSwitcher);
void createPayloadComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF& pwrSwitcher);
void createReactionWheelComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF* pwrSwitcher);
ReturnValue_t createCcsdsComponents(CcsdsComponentArgs& args);
ReturnValue_t readFirmwareVersion();
void createMiscComponents();
void createTestComponents(LinuxLibgpioIF* gpioComIF);

View File

@ -11,13 +11,13 @@
#include "OBSWConfig.h"
#include "bsp_q7s/core/WatchdogHandler.h"
#include "commonConfig.h"
#include "core/scheduling.h"
#include "fsfw/tasks/TaskFactory.h"
#include "fsfw/version.h"
#include "mission/acs/defs.h"
#include "mission/com/defs.h"
#include "mission/system/systemTree.h"
#include "q7sConfig.h"
#include "scheduling.h"
#include "watchdog/definitions.h"
static constexpr int OBSW_ALREADY_RUNNING = -2;

View File

@ -9,7 +9,6 @@
#include <vector>
#include "OBSWConfig.h"
#include "bsp_q7s/core/ObjectFactory.h"
#include "fsfw/objectmanager/ObjectManager.h"
#include "fsfw/objectmanager/ObjectManagerIF.h"
#include "fsfw/platform.h"
@ -21,6 +20,8 @@
#include "mission/pollingSeqTables.h"
#include "mission/scheduling.h"
#include "mission/utility/InitMission.h"
#include "objectFactory.h"
#include "q7sConfig.h"
/* This is configured for linux without CR */
#ifdef PLATFORM_UNIX
@ -324,6 +325,10 @@ void scheduling::initTasks() {
if (result != returnvalue::OK) {
scheduling::printAddObjectError("HEATER_HANDLER", objects::HEATER_HANDLER);
}
result = tcsSystemTask->addComponent(objects::HEATER_HANDLER);
if (result != returnvalue::OK) {
scheduling::printAddObjectError("HEATER_HANDLER", objects::HEATER_HANDLER);
}
#if OBSW_ADD_SYRLINKS == 1
PeriodicTaskIF* syrlinksCom = factory->createPeriodicTask(
@ -527,7 +532,15 @@ void scheduling::createPstTasks(TaskFactory& factory, TaskDeadlineMissedFunction
FixedTimeslotTaskIF* i2cPst =
factory.createFixedTimeslotTask("I2C_PS_PST", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.6,
missedDeadlineFunc, &RR_SCHEDULING);
result = pst::pstI2cProcessingSystem(i2cPst);
pst::TmpSchedConfig tmpSchedConf;
#if OBSW_Q7S_EM == 1
tmpSchedConf.scheduleTmpDev0 = true;
tmpSchedConf.scheduleTmpDev1 = true;
tmpSchedConf.schedulePlPcduDev0 = true;
tmpSchedConf.schedulePlPcduDev1 = true;
tmpSchedConf.scheduleIfBoardDev = true;
#endif
result = pst::pstI2c(tmpSchedConf, i2cPst);
if (result != returnvalue::OK) {
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
sif::warning << "scheduling::initTasks: I2C PST is empty" << std::endl;

View File

@ -129,7 +129,7 @@ ReturnValue_t Xadc::readValFromFile(const char* filename, T& val) {
sif::warning << "Xadc::readValFromFile: Failed to open file " << filename << std::endl;
return returnvalue::FAILED;
}
char valstring[MAX_STR_LENGTH] = "";
char valstring[MAX_STR_LENGTH]{};
char* returnVal = fgets(valstring, MAX_STR_LENGTH, fp);
if (returnVal == nullptr) {
sif::warning << "Xadc::readValFromFile: Failed to read string from file " << filename
@ -139,6 +139,11 @@ ReturnValue_t Xadc::readValFromFile(const char* filename, T& val) {
}
std::istringstream valSstream(valstring);
valSstream >> val;
if (valSstream.bad()) {
sif::warning << "Xadc: Conversion of value to target type failed" << std::endl;
fclose(fp);
return returnvalue::FAILED;
}
fclose(fp);
return returnvalue::OK;
}

View File

@ -96,13 +96,9 @@ enum gpioId_t {
SPI_MUX,
VC0_PAPB_EMPTY,
VC0_PAPB_BUSY,
VC1_PAPB_EMPTY,
VC1_PAPB_BUSY,
VC2_PAPB_EMPTY,
VC2_PAPB_BUSY,
VC3_PAPB_EMPTY,
VC3_PAPB_BUSY,
PTME_RESETN,
PDEC_RESET,

View File

@ -11,6 +11,8 @@ static constexpr char SD_1_MOUNT_POINT[] = "/mnt/sd1";
static constexpr char OBSW_UPDATE_ARCHIVE_FILE_NAME[] = "eive-sw-update.tar.xz";
static constexpr char STRIPPED_OBSW_BINARY_FILE_NAME[] = "eive-obsw-stripped";
static constexpr char OBSW_VERSION_FILE_NAME[] = "obsw_version.txt";
static constexpr char PUS_SEQUENCE_COUNT_FILE[] = "pus-sequence-count.txt";
static constexpr char CFDP_SEQUENCE_COUNT_FILE[] = "cfdp-sequence-count.txt";
static constexpr char OBSW_PATH[] = "/usr/bin/eive-obsw";
static constexpr char OBSW_VERSION_FILE_PATH[] = "/usr/share/eive-obsw/obsw_version.txt";

View File

@ -40,6 +40,7 @@ enum : uint8_t {
COM_SUBSYSTEM = 142,
PERSISTENT_TM_STORE = 143,
SYRLINKS_COM = 144,
SUS_HANDLER = 145,
COMMON_SUBSYSTEM_ID_END
};

View File

@ -19,6 +19,7 @@ target_sources(
GpsCtrlDummy.cpp
GyroAdisDummy.cpp
GyroL3GD20Dummy.cpp
RadSensorDummy.cpp
MgmLIS3MDLDummy.cpp
PlPcduDummy.cpp
ExecutableComIfDummy.cpp

View File

@ -1,6 +1,6 @@
#include "CoreControllerDummy.h"
#include <bsp_q7s/core/CoreDefinitions.h>
#include <bsp_q7s/core/defs.h>
#include <objects/systemObjectList.h>
#include <cmath>

View File

@ -7,15 +7,21 @@ using namespace returnvalue;
Max31865Dummy::Max31865Dummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
: DeviceHandlerBase(objectId, comif, comCookie), set(this, EiveMax31855::EXCHANGE_SET_ID) {}
void Max31865Dummy::doStartUp() { setMode(MODE_ON); }
void Max31865Dummy::doShutDown() { setMode(_MODE_POWER_DOWN); }
void Max31865Dummy::doShutDown() {
PoolReadGuard pg(&set);
set.setValidity(false, true);
setMode(MODE_OFF);
}
ReturnValue_t Max31865Dummy::buildNormalDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND;
}
ReturnValue_t Max31865Dummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) { return OK; }
ReturnValue_t Max31865Dummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND;
}
ReturnValue_t Max31865Dummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
const uint8_t *commandData,
size_t commandDataLen) {
return 0;
return NOTHING_TO_SEND;
}
ReturnValue_t Max31865Dummy::scanForReply(const uint8_t *start, size_t len,
DeviceCommandId_t *foundId, size_t *foundLen) {

View File

@ -7,7 +7,7 @@ PlPcduDummy::PlPcduDummy(object_id_t objectId, object_id_t comif, CookieIF *comC
PlPcduDummy::~PlPcduDummy() {}
void PlPcduDummy::doStartUp() { setMode(MODE_NORMAL); }
void PlPcduDummy::doStartUp() { setMode(MODE_ON); }
void PlPcduDummy::doShutDown() { setMode(MODE_OFF); }

View File

@ -0,0 +1,55 @@
#include "RadSensorDummy.h"
RadSensorDummy::RadSensorDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
: DeviceHandlerBase(objectId, comif, comCookie), sensorSet(this) {}
RadSensorDummy::~RadSensorDummy() {}
void RadSensorDummy::doStartUp() { setMode(MODE_ON); }
void RadSensorDummy::doShutDown() { setMode(MODE_OFF); }
ReturnValue_t RadSensorDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND;
}
ReturnValue_t RadSensorDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND;
}
ReturnValue_t RadSensorDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
const uint8_t *commandData,
size_t commandDataLen) {
return returnvalue::OK;
}
ReturnValue_t RadSensorDummy::scanForReply(const uint8_t *start, size_t len,
DeviceCommandId_t *foundId, size_t *foundLen) {
return returnvalue::OK;
}
ReturnValue_t RadSensorDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
return returnvalue::OK;
}
void RadSensorDummy::fillCommandAndReplyMap() {}
uint32_t RadSensorDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
ReturnValue_t RadSensorDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) {
localDataPoolMap.emplace(radSens::TEMPERATURE_C, new PoolEntry<float>({0.0}));
localDataPoolMap.emplace(radSens::AIN0, new PoolEntry<uint16_t>({0}));
localDataPoolMap.emplace(radSens::AIN1, new PoolEntry<uint16_t>({0}));
localDataPoolMap.emplace(radSens::AIN4, new PoolEntry<uint16_t>({0}));
localDataPoolMap.emplace(radSens::AIN5, new PoolEntry<uint16_t>({0}));
localDataPoolMap.emplace(radSens::AIN6, new PoolEntry<uint16_t>({0}));
localDataPoolMap.emplace(radSens::AIN7, new PoolEntry<uint16_t>({0}));
poolManager.subscribeForRegularPeriodicPacket(
subdp::RegularHkPeriodicParams(sensorSet.getSid(), false, 20.0));
return returnvalue::OK;
return returnvalue::OK;
}
LocalPoolDataSetBase *RadSensorDummy::getDataSetHandle(sid_t sid) { return &sensorSet; }

35
dummies/RadSensorDummy.h Normal file
View File

@ -0,0 +1,35 @@
#pragma once
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
#include "mission/payload/radSensorDefinitions.h"
class RadSensorDummy : public DeviceHandlerBase {
public:
static const DeviceCommandId_t SIMPLE_COMMAND = 1;
static const DeviceCommandId_t PERIODIC_REPLY = 2;
static const uint8_t SIMPLE_COMMAND_DATA = 1;
static const uint8_t PERIODIC_REPLY_DATA = 2;
RadSensorDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie);
virtual ~RadSensorDummy();
protected:
radSens::RadSensorDataset sensorSet;
void doStartUp() override;
void doShutDown() override;
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t *id) override;
ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t *commandData,
size_t commandDataLen) override;
ReturnValue_t scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
size_t *foundLen) override;
ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) override;
void fillCommandAndReplyMap() override;
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) override;
LocalPoolDataSetBase *getDataSetHandle(sid_t sid) override;
};

View File

@ -5,7 +5,7 @@ SusDummy::SusDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
SusDummy::~SusDummy() {}
void SusDummy::doStartUp() { setMode(MODE_NORMAL); }
void SusDummy::doStartUp() { setMode(MODE_ON); }
void SusDummy::doShutDown() { setMode(MODE_OFF); }

View File

@ -7,9 +7,9 @@
#include <cstdlib>
#include <utility>
TemperatureSensorInserter::TemperatureSensorInserter(object_id_t objectId,
Max31865DummyMap tempSensorDummies_,
Tmp1075DummyMap tempTmpSensorDummies_)
TemperatureSensorInserter::TemperatureSensorInserter(
object_id_t objectId, Max31865DummyMap tempSensorDummies_,
std::optional<Tmp1075DummyMap> tempTmpSensorDummies_)
: SystemObject(objectId),
max31865DummyMap(std::move(tempSensorDummies_)),
tmp1075DummyMap(std::move(tempTmpSensorDummies_)) {}
@ -25,8 +25,10 @@ ReturnValue_t TemperatureSensorInserter::performOperation(uint8_t opCode) {
for (auto& rtdDummy : max31865DummyMap) {
rtdDummy.second->setTemperature(10, true);
}
for (auto& tmpDummy : tmp1075DummyMap) {
tmpDummy.second->setTemperature(10, true);
if (tmp1075DummyMap.has_value()) {
for (auto& tmpDummy : tmp1075DummyMap.value()) {
tmpDummy.second->setTemperature(10, true);
}
}
tempsWereInitialized = true;
}
@ -96,6 +98,25 @@ ReturnValue_t TemperatureSensorInserter::performOperation(uint8_t opCode) {
}
break;
}
case (TestCase::COLD_PLOC_CONSECUTIVE): {
if (cycles == 15) {
sif::debug << "Setting cold PLOC temperature" << std::endl;
max31865DummyMap[objects::RTD_0_IC3_PLOC_HEATSPREADER]->setTemperature(-15, true);
}
if (cycles == 30) {
sif::debug << "Setting warmer PLOC temperature" << std::endl;
max31865DummyMap[objects::RTD_0_IC3_PLOC_HEATSPREADER]->setTemperature(0, true);
}
if (cycles == 45) {
sif::debug << "Setting cold PLOC temperature again" << std::endl;
max31865DummyMap[objects::RTD_0_IC3_PLOC_HEATSPREADER]->setTemperature(-15, true);
}
if (cycles == 60) {
sif::debug << "Setting warmer PLOC temperature again" << std::endl;
max31865DummyMap[objects::RTD_0_IC3_PLOC_HEATSPREADER]->setTemperature(0, true);
}
break;
}
case (TestCase::COLD_CAMERA): {
if (cycles == 15) {
sif::debug << "Setting cold CAM temperature" << std::endl;
@ -105,6 +126,21 @@ ReturnValue_t TemperatureSensorInserter::performOperation(uint8_t opCode) {
sif::debug << "Setting CAM temperature back to normal" << std::endl;
max31865DummyMap[objects::RTD_2_IC5_4K_CAMERA]->setTemperature(0, true);
}
break;
}
case (TestCase::COLD_PLOC_STAYS_COLD): {
if (cycles == 15) {
sif::debug << "Setting cold PLOC temperature" << std::endl;
max31865DummyMap[objects::RTD_0_IC3_PLOC_HEATSPREADER]->setTemperature(-40, true);
}
break;
}
case (TestCase::COLD_CAMERA_STAYS_COLD): {
if (cycles == 15) {
sif::debug << "Setting cold PLOC temperature" << std::endl;
max31865DummyMap[objects::RTD_2_IC5_4K_CAMERA]->setTemperature(-40, true);
}
break;
}
}
cycles++;

View File

@ -12,7 +12,7 @@ class TemperatureSensorInserter : public ExecutableObjectIF, public SystemObject
using Max31865DummyMap = std::map<object_id_t, Max31865Dummy*>;
using Tmp1075DummyMap = std::map<object_id_t, Tmp1075Dummy*>;
explicit TemperatureSensorInserter(object_id_t objectId, Max31865DummyMap tempSensorDummies_,
Tmp1075DummyMap tempTmpSensorDummies_);
std::optional<Tmp1075DummyMap> tempTmpSensorDummies_);
ReturnValue_t initialize() override;
ReturnValue_t initializeAfterTaskCreation() override;
@ -22,7 +22,7 @@ class TemperatureSensorInserter : public ExecutableObjectIF, public SystemObject
private:
Max31865DummyMap max31865DummyMap;
Tmp1075DummyMap tmp1075DummyMap;
std::optional<Tmp1075DummyMap> tmp1075DummyMap;
enum TestCase {
NONE = 0,
@ -32,6 +32,9 @@ class TemperatureSensorInserter : public ExecutableObjectIF, public SystemObject
COLD_STR = 4,
COLD_STR_CONSECUTIVE = 5,
COLD_CAMERA = 6,
COLD_PLOC_CONSECUTIVE = 7,
COLD_PLOC_STAYS_COLD = 8,
COLD_CAMERA_STAYS_COLD = 9
};
int iteration = 0;
uint32_t cycles = 0;

View File

@ -8,35 +8,57 @@ using namespace returnvalue;
Tmp1075Dummy::Tmp1075Dummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
: DeviceHandlerBase(objectId, comif, comCookie), set(this) {}
void Tmp1075Dummy::doStartUp() { setMode(MODE_NORMAL); }
void Tmp1075Dummy::doShutDown() { setMode(MODE_OFF); }
void Tmp1075Dummy::doStartUp() { setMode(MODE_ON); }
void Tmp1075Dummy::doShutDown() {
PoolReadGuard pg(&set);
set.setValidity(false, true);
setMode(MODE_OFF);
}
ReturnValue_t Tmp1075Dummy::buildNormalDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND;
}
ReturnValue_t Tmp1075Dummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) { return OK; }
ReturnValue_t Tmp1075Dummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND;
}
ReturnValue_t Tmp1075Dummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
const uint8_t *commandData,
size_t commandDataLen) {
return 0;
return NOTHING_TO_SEND;
}
ReturnValue_t Tmp1075Dummy::scanForReply(const uint8_t *start, size_t len,
DeviceCommandId_t *foundId, size_t *foundLen) {
return 0;
}
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>({10.0}, true));
return OK;
}
ReturnValue_t Tmp1075Dummy::setHealth(HealthState health) {
if (health == FAULTY or health == PERMANENT_FAULTY) {
setMode(_MODE_SHUT_DOWN);
}
return DeviceHandlerBase::setHealth(health);
}
LocalPoolDataSetBase *Tmp1075Dummy::getDataSetHandle(sid_t sid) { return &set; }

View File

@ -26,6 +26,7 @@ class Tmp1075Dummy : public DeviceHandlerBase {
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) override;
ReturnValue_t setHealth(HealthState health) override;
protected:
LocalPoolDataSetBase *getDataSetHandle(sid_t sid) override;

View File

@ -18,6 +18,7 @@
#include <dummies/PlPcduDummy.h>
#include <dummies/PlocMpsocDummy.h>
#include <dummies/PlocSupervisorDummy.h>
#include <dummies/RadSensorDummy.h>
#include <dummies/RwDummy.h>
#include <dummies/SaDeploymentDummy.h>
#include <dummies/ScexDummy.h>
@ -34,6 +35,7 @@
#include "TemperatureSensorInserter.h"
#include "dummies/Max31865Dummy.h"
#include "dummies/SusDummy.h"
#include "dummies/Tmp1075Dummy.h"
#include "mission/genericFactory.h"
#include "mission/system/acs/acsModeTree.h"
@ -63,11 +65,14 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio
rws[3] = new RwDummy(objects::RW4, objects::DUMMY_COM_IF, comCookieDummy);
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);
auto* strDummy =
new StarTrackerDummy(objects::STAR_TRACKER, objects::DUMMY_COM_IF, comCookieDummy);
strDummy->connectModeTreeParent(*strAssy);
if (cfg.addStrDummy) {
auto* strAssy = new StrAssembly(objects::STR_ASSY);
strAssy->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM);
auto* strDummy =
new StarTrackerDummy(objects::STAR_TRACKER, objects::DUMMY_COM_IF, comCookieDummy);
strDummy->connectModeTreeParent(*strAssy);
}
if (cfg.addSyrlinksDummies) {
auto* syrlinksDummy =
new SyrlinksDummy(objects::SYRLINKS_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
@ -191,25 +196,36 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio
objects::RTD_15_IC18_IMTQ,
new Max31865Dummy(objects::RTD_15_IC18_IMTQ, objects::DUMMY_COM_IF, comCookieDummy));
std::map<object_id_t, Tmp1075Dummy*> tmpSensorDummies;
tmpSensorDummies.emplace(
objects::TMP1075_HANDLER_TCS_0,
new Tmp1075Dummy(objects::TMP1075_HANDLER_TCS_0, objects::DUMMY_COM_IF, comCookieDummy));
tmpSensorDummies.emplace(
objects::TMP1075_HANDLER_TCS_1,
new Tmp1075Dummy(objects::TMP1075_HANDLER_TCS_1, objects::DUMMY_COM_IF, comCookieDummy));
tmpSensorDummies.emplace(
objects::TMP1075_HANDLER_PLPCDU_0,
new Tmp1075Dummy(objects::TMP1075_HANDLER_PLPCDU_0, objects::DUMMY_COM_IF, comCookieDummy));
// damaged.
// tmpSensorDummies.emplace(
// objects::TMP1075_HANDLER_PLPCDU_1,
// new Tmp1075Dummy(objects::TMP1075_HANDLER_PLPCDU_1, objects::DUMMY_COM_IF,
// comCookieDummy));
tmpSensorDummies.emplace(
objects::TMP1075_HANDLER_IF_BOARD,
new Tmp1075Dummy(objects::TMP1075_HANDLER_IF_BOARD, objects::DUMMY_COM_IF, comCookieDummy));
std::optional<TemperatureSensorInserter::Tmp1075DummyMap> tmpSensorDummies;
if (cfg.addTmpDummies) {
TemperatureSensorInserter::Tmp1075DummyMap tmpDummyMap;
if (cfg.tmp1075Cfg.addTcsBrd0) {
tmpDummyMap.emplace(objects::TMP1075_HANDLER_TCS_0,
new Tmp1075Dummy(objects::TMP1075_HANDLER_TCS_0, objects::DUMMY_COM_IF,
comCookieDummy));
}
if (cfg.tmp1075Cfg.addTcsBrd1) {
tmpDummyMap.emplace(objects::TMP1075_HANDLER_TCS_1,
new Tmp1075Dummy(objects::TMP1075_HANDLER_TCS_1, objects::DUMMY_COM_IF,
comCookieDummy));
}
if (cfg.tmp1075Cfg.addPlPcdu0) {
tmpDummyMap.emplace(objects::TMP1075_HANDLER_PLPCDU_0,
new Tmp1075Dummy(objects::TMP1075_HANDLER_PLPCDU_0,
objects::DUMMY_COM_IF, comCookieDummy));
}
if (cfg.tmp1075Cfg.addPlPcdu1) {
tmpDummyMap.emplace(objects::TMP1075_HANDLER_PLPCDU_1,
new Tmp1075Dummy(objects::TMP1075_HANDLER_PLPCDU_1,
objects::DUMMY_COM_IF, comCookieDummy));
}
if (cfg.tmp1075Cfg.addIfBrd) {
tmpDummyMap.emplace(objects::TMP1075_HANDLER_IF_BOARD,
new Tmp1075Dummy(objects::TMP1075_HANDLER_IF_BOARD,
objects::DUMMY_COM_IF, comCookieDummy));
}
tmpSensorDummies = std::move(tmpDummyMap);
}
new TemperatureSensorInserter(objects::THERMAL_TEMP_INSERTER, rtdSensorDummies,
tmpSensorDummies);
TcsBoardAssembly* tcsBoardAssy =
@ -217,8 +233,10 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio
for (auto& rtd : rtdSensorDummies) {
rtd.second->connectModeTreeParent(*tcsBoardAssy);
}
for (auto& tmp : tmpSensorDummies) {
tmp.second->connectModeTreeParent(satsystem::tcs::SUBSYSTEM);
if (tmpSensorDummies.has_value()) {
for (auto& tmp : tmpSensorDummies.value()) {
tmp.second->connectModeTreeParent(satsystem::tcs::SUBSYSTEM);
}
}
}
if (cfg.addCamSwitcherDummy) {
@ -226,11 +244,15 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio
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);
auto* plPcduDummy =
new PlPcduDummy(objects::PLPCDU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
plPcduDummy->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
if (cfg.addScexDummy) {
auto* scexDummy = new ScexDummy(objects::SCEX, objects::DUMMY_COM_IF, comCookieDummy);
scexDummy->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
}
if (cfg.addPlPcduDummy) {
auto* plPcduDummy =
new PlPcduDummy(objects::PLPCDU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
plPcduDummy->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
}
if (cfg.addPlocDummies) {
auto* plocMpsocDummy =
new PlocMpsocDummy(objects::PLOC_MPSOC_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
@ -239,4 +261,9 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio
objects::PLOC_SUPERVISOR_HANDLER, objects::DUMMY_COM_IF, comCookieDummy, pwrSwitcher);
plocSupervisorDummy->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
}
if (cfg.addRadSensorDummy) {
auto* radSensorDummy =
new RadSensorDummy(objects::RAD_SENSOR, objects::DUMMY_COM_IF, comCookieDummy);
radSensorDummy->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
}
}

View File

@ -6,6 +6,14 @@ class GpioIF;
namespace dummy {
struct Tmp1075Cfg {
bool addTcsBrd0 = true;
bool addTcsBrd1 = true;
bool addPlPcdu0 = true;
bool addPlPcdu1 = true;
bool addIfBrd = true;
};
// Default values targeted towards EM.
struct DummyCfg {
bool addCoreCtrlCfg = true;
@ -19,7 +27,13 @@ struct DummyCfg {
bool addTempSensorDummies = true;
bool addRtdComIFDummy = true;
bool addPlocDummies = true;
bool addStrDummy = true;
bool addTmpDummies = true;
bool addRadSensorDummy = true;
bool addPlPcduDummy = false;
Tmp1075Cfg tmp1075Cfg;
bool addCamSwitcherDummy = false;
bool addScexDummy = false;
};
void createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitch, GpioIF* gpioIF, bool enableHkSets);

2
fsfw

Submodule fsfw updated: 0f76cdb3ba...d246ce34d0

View File

@ -94,6 +94,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
11205;0x2bc5;MEKF_AUTOMATIC_RESET;INFO;MEKF performed an automatic reset after detection of nonfinite values.;mission/acs/defs.h
11206;0x2bc6;MEKF_INVALID_MODE_VIOLATION;HIGH;MEKF was not able to compute a solution during any pointing ACS mode for a prolonged time.;mission/acs/defs.h
11207;0x2bc7;SAFE_MODE_CONTROLLER_FAILURE;HIGH;The ACS safe mode controller was not able to compute a solution and has failed. P1: Missing information about magnetic field, P2: Missing information about rotational rate;mission/acs/defs.h
11208;0x2bc8;TLE_TOO_OLD;INFO;The TLE for the SGP4 Propagator has become too old.;mission/acs/defs.h
11300;0x2c24;SWITCH_CMD_SENT;INFO;Indicates that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index;mission/power/defs.h
11301;0x2c25;SWITCH_HAS_CHANGED;INFO;Indicated that a switch state has changed P1: New switch state, 1 for on, 0 for off | P2: Switch Index;mission/power/defs.h
11302;0x2c26;SWITCHING_Q7S_DENIED;MEDIUM;No description;mission/power/defs.h
@ -133,6 +134,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
11802;0x2e1a;RESET_OCCURED;LOW;No description;mission/acs/rwHelpers.h
11901;0x2e7d;BOOTING_FIRMWARE_FAILED_EVENT;LOW;Failed to boot firmware;mission/acs/str/StarTrackerHandler.h
11902;0x2e7e;BOOTING_BOOTLOADER_FAILED_EVENT;LOW;Failed to boot star tracker into bootloader mode;mission/acs/str/StarTrackerHandler.h
11903;0x2e7f;COM_ERROR_REPLY_RECEIVED;LOW;Received COM error. P1: Communication Error ID (datasheet p32);mission/acs/str/StarTrackerHandler.h
12001;0x2ee1;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;linux/payload/PlocSupervisorHandler.h
12002;0x2ee2;SUPV_UNKNOWN_TM;LOW;Unhandled event. P1: APID, P2: Service ID;linux/payload/PlocSupervisorHandler.h
12003;0x2ee3;SUPV_UNINIMPLEMENTED_TM;LOW;No description;linux/payload/PlocSupervisorHandler.h
@ -160,6 +162,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
12412;0x307c;PDEC_RESET_FAILED;HIGH;Failed to pull PDEC reset to low;linux/ipcore/pdec.h
12413;0x307d;OPEN_IRQ_FILE_FAILED;HIGH;Failed to open the IRQ uio file;linux/ipcore/pdec.h
12414;0x307e;PDEC_INIT_FAILED;HIGH;PDEC initialization failed. This might also be due to the persistent confiuration never becoming available, for example due to SD card issues.;linux/ipcore/pdec.h
12415;0x307f;PDEC_CONFIG_CORRUPTED;HIGH;The PDEC configuration area has been corrupted P1: The first configuration word P2: The second configuration word;linux/ipcore/pdec.h
12500;0x30d4;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;linux/acs/StrComHandler.h
12501;0x30d5;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;linux/acs/StrComHandler.h
12502;0x30d6;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;linux/acs/StrComHandler.h
@ -254,6 +257,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
13800;0x35e8;MISSING_PACKET;LOW;No description;mission/payload/scexHelpers.h
13801;0x35e9;EXPERIMENT_TIMEDOUT;LOW;No description;mission/payload/scexHelpers.h
13802;0x35ea;MULTI_PACKET_COMMAND_DONE;INFO;No description;mission/payload/scexHelpers.h
13803;0x35eb;FS_UNUSABLE;LOW;No description;mission/payload/scexHelpers.h
13901;0x364d;SET_CONFIGFILEVALUE_FAILED;MEDIUM;No description;mission/utility/GlobalConfigHandler.h
13902;0x364e;GET_CONFIGFILEVALUE_FAILED;MEDIUM;No description;mission/utility/GlobalConfigHandler.h
13903;0x364f;INSERT_CONFIGFILEVALUE_FAILED;MEDIUM;No description;mission/utility/GlobalConfigHandler.h
@ -272,6 +276,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
14011;0x36bb;I2C_REBOOT;HIGH;I2C is unavailable. Recovery did not work, performing full reboot.;mission/sysDefs.h
14012;0x36bc;PDEC_REBOOT;HIGH;PDEC recovery through reset was not possible, performing full reboot.;mission/sysDefs.h
14013;0x36bd;FIRMWARE_INFO;INFO;Version information of the firmware (not OBSW). P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash P2: First four letters of Git SHA is the last byte of P1 is set.;mission/sysDefs.h
14014;0x36be;ACTIVE_SD_INFO;INFO;Active SD card info. SD States: 0: OFF, 1: ON, 2: MOUNTED. P1: Active SD Card Index, 0 if none is active P2: First two bytes: SD state of SD card 0, last two bytes SD state of SD card 1;mission/sysDefs.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
@ -280,6 +285,9 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
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
14108;0x371c;MGT_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
14109;0x371d;TCS_SWITCHING_HEATER_ON;INFO;P1: Module index. P2: Heater index;mission/controller/tcsDefs.h
14110;0x371e;TCS_SWITCHING_HEATER_OFF;INFO;P1: Module index. P2: Heater index;mission/controller/tcsDefs.h
14111;0x371f;TCS_HEATER_MAX_BURN_TIME_REACHED;MEDIUM;P1: Heater index. P2: Maximum burn time for heater.;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
@ -295,3 +303,5 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
14312;0x37e8;DUMP_MISC_CANCELLED;LOW;P1: Number of dumped packets. P2: Total dumped bytes.;mission/persistentTmStoreDefs.h
14313;0x37e9;DUMP_HK_CANCELLED;LOW;P1: Number of dumped packets. P2: Total dumped bytes.;mission/persistentTmStoreDefs.h
14314;0x37ea;DUMP_CFDP_CANCELLED;LOW;P1: Number of dumped packets. P2: Total dumped bytes.;mission/persistentTmStoreDefs.h
14500;0x38a4;TEMPERATURE_ALL_ONES_START;MEDIUM;Detected invalid values, starting invalid message counting;mission/acs/SusHandler.h
14501;0x38a5;TEMPERATURE_ALL_ONES_RECOVERY;INFO;Detected valid values again, resetting invalid message counter. P1: Invalid message counter.;mission/acs/SusHandler.h

1 Event ID (dec) Event ID (hex) Name Severity Description File Path
94 11205 0x2bc5 MEKF_AUTOMATIC_RESET INFO MEKF performed an automatic reset after detection of nonfinite values. mission/acs/defs.h
95 11206 0x2bc6 MEKF_INVALID_MODE_VIOLATION HIGH MEKF was not able to compute a solution during any pointing ACS mode for a prolonged time. mission/acs/defs.h
96 11207 0x2bc7 SAFE_MODE_CONTROLLER_FAILURE HIGH The ACS safe mode controller was not able to compute a solution and has failed. P1: Missing information about magnetic field, P2: Missing information about rotational rate mission/acs/defs.h
97 11208 0x2bc8 TLE_TOO_OLD INFO The TLE for the SGP4 Propagator has become too old. mission/acs/defs.h
98 11300 0x2c24 SWITCH_CMD_SENT INFO Indicates that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index mission/power/defs.h
99 11301 0x2c25 SWITCH_HAS_CHANGED INFO Indicated that a switch state has changed P1: New switch state, 1 for on, 0 for off | P2: Switch Index mission/power/defs.h
100 11302 0x2c26 SWITCHING_Q7S_DENIED MEDIUM No description mission/power/defs.h
134 11802 0x2e1a RESET_OCCURED LOW No description mission/acs/rwHelpers.h
135 11901 0x2e7d BOOTING_FIRMWARE_FAILED_EVENT LOW Failed to boot firmware mission/acs/str/StarTrackerHandler.h
136 11902 0x2e7e BOOTING_BOOTLOADER_FAILED_EVENT LOW Failed to boot star tracker into bootloader mode mission/acs/str/StarTrackerHandler.h
137 11903 0x2e7f COM_ERROR_REPLY_RECEIVED LOW Received COM error. P1: Communication Error ID (datasheet p32) mission/acs/str/StarTrackerHandler.h
138 12001 0x2ee1 SUPV_MEMORY_READ_RPT_CRC_FAILURE LOW PLOC supervisor crc failure in telemetry packet linux/payload/PlocSupervisorHandler.h
139 12002 0x2ee2 SUPV_UNKNOWN_TM LOW Unhandled event. P1: APID, P2: Service ID linux/payload/PlocSupervisorHandler.h
140 12003 0x2ee3 SUPV_UNINIMPLEMENTED_TM LOW No description linux/payload/PlocSupervisorHandler.h
162 12412 0x307c PDEC_RESET_FAILED HIGH Failed to pull PDEC reset to low linux/ipcore/pdec.h
163 12413 0x307d OPEN_IRQ_FILE_FAILED HIGH Failed to open the IRQ uio file linux/ipcore/pdec.h
164 12414 0x307e PDEC_INIT_FAILED HIGH PDEC initialization failed. This might also be due to the persistent confiuration never becoming available, for example due to SD card issues. linux/ipcore/pdec.h
165 12415 0x307f PDEC_CONFIG_CORRUPTED HIGH The PDEC configuration area has been corrupted P1: The first configuration word P2: The second configuration word linux/ipcore/pdec.h
166 12500 0x30d4 IMAGE_UPLOAD_FAILED LOW Image upload failed linux/acs/StrComHandler.h
167 12501 0x30d5 IMAGE_DOWNLOAD_FAILED LOW Image download failed linux/acs/StrComHandler.h
168 12502 0x30d6 IMAGE_UPLOAD_SUCCESSFUL LOW Uploading image to star tracker was successfulop linux/acs/StrComHandler.h
257 13800 0x35e8 MISSING_PACKET LOW No description mission/payload/scexHelpers.h
258 13801 0x35e9 EXPERIMENT_TIMEDOUT LOW No description mission/payload/scexHelpers.h
259 13802 0x35ea MULTI_PACKET_COMMAND_DONE INFO No description mission/payload/scexHelpers.h
260 13803 0x35eb FS_UNUSABLE LOW No description mission/payload/scexHelpers.h
261 13901 0x364d SET_CONFIGFILEVALUE_FAILED MEDIUM No description mission/utility/GlobalConfigHandler.h
262 13902 0x364e GET_CONFIGFILEVALUE_FAILED MEDIUM No description mission/utility/GlobalConfigHandler.h
263 13903 0x364f INSERT_CONFIGFILEVALUE_FAILED MEDIUM No description mission/utility/GlobalConfigHandler.h
276 14011 0x36bb I2C_REBOOT HIGH I2C is unavailable. Recovery did not work, performing full reboot. mission/sysDefs.h
277 14012 0x36bc PDEC_REBOOT HIGH PDEC recovery through reset was not possible, performing full reboot. mission/sysDefs.h
278 14013 0x36bd FIRMWARE_INFO INFO Version information of the firmware (not OBSW). P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash P2: First four letters of Git SHA is the last byte of P1 is set. mission/sysDefs.h
279 14014 0x36be ACTIVE_SD_INFO INFO Active SD card info. SD States: 0: OFF, 1: ON, 2: MOUNTED. P1: Active SD Card Index, 0 if none is active P2: First two bytes: SD state of SD card 0, last two bytes SD state of SD card 1 mission/sysDefs.h
280 14100 0x3714 NO_VALID_SENSOR_TEMPERATURE MEDIUM No description mission/controller/tcsDefs.h
281 14101 0x3715 NO_HEALTHY_HEATER_AVAILABLE MEDIUM No description mission/controller/tcsDefs.h
282 14102 0x3716 SYRLINKS_OVERHEATING HIGH No description mission/controller/tcsDefs.h
285 14106 0x371a PCDU_SYSTEM_OVERHEATING HIGH No description mission/controller/tcsDefs.h
286 14107 0x371b HEATER_NOT_OFF_FOR_OFF_MODE MEDIUM No description mission/controller/tcsDefs.h
287 14108 0x371c MGT_OVERHEATING HIGH No description mission/controller/tcsDefs.h
288 14109 0x371d TCS_SWITCHING_HEATER_ON INFO P1: Module index. P2: Heater index mission/controller/tcsDefs.h
289 14110 0x371e TCS_SWITCHING_HEATER_OFF INFO P1: Module index. P2: Heater index mission/controller/tcsDefs.h
290 14111 0x371f TCS_HEATER_MAX_BURN_TIME_REACHED MEDIUM P1: Heater index. P2: Maximum burn time for heater. mission/controller/tcsDefs.h
291 14201 0x3779 TX_TIMER_EXPIRED INFO The transmit timer to protect the Syrlinks expired P1: The current timer value mission/system/com/ComSubsystem.h
292 14202 0x377a BIT_LOCK_TX_ON INFO Transmitter will be turned on due to detection of bitlock mission/system/com/ComSubsystem.h
293 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
303 14312 0x37e8 DUMP_MISC_CANCELLED LOW P1: Number of dumped packets. P2: Total dumped bytes. mission/persistentTmStoreDefs.h
304 14313 0x37e9 DUMP_HK_CANCELLED LOW P1: Number of dumped packets. P2: Total dumped bytes. mission/persistentTmStoreDefs.h
305 14314 0x37ea DUMP_CFDP_CANCELLED LOW P1: Number of dumped packets. P2: Total dumped bytes. mission/persistentTmStoreDefs.h
306 14500 0x38a4 TEMPERATURE_ALL_ONES_START MEDIUM Detected invalid values, starting invalid message counting mission/acs/SusHandler.h
307 14501 0x38a5 TEMPERATURE_ALL_ONES_RECOVERY INFO Detected valid values again, resetting invalid message counter. P1: Invalid message counter. mission/acs/SusHandler.h

View File

@ -60,3 +60,4 @@
142;COM_SUBSYSTEM
143;PERSISTENT_TM_STORE
144;SYRLINKS_COM
145;SUS_HANDLER

1 22 MEMORY
60 142 COM_SUBSYSTEM
61 143 PERSISTENT_TM_STORE
62 144 SYRLINKS_COM
63 145 SUS_HANDLER

View File

@ -94,6 +94,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
11205;0x2bc5;MEKF_AUTOMATIC_RESET;INFO;MEKF performed an automatic reset after detection of nonfinite values.;mission/acs/defs.h
11206;0x2bc6;MEKF_INVALID_MODE_VIOLATION;HIGH;MEKF was not able to compute a solution during any pointing ACS mode for a prolonged time.;mission/acs/defs.h
11207;0x2bc7;SAFE_MODE_CONTROLLER_FAILURE;HIGH;The ACS safe mode controller was not able to compute a solution and has failed. P1: Missing information about magnetic field, P2: Missing information about rotational rate;mission/acs/defs.h
11208;0x2bc8;TLE_TOO_OLD;INFO;The TLE for the SGP4 Propagator has become too old.;mission/acs/defs.h
11300;0x2c24;SWITCH_CMD_SENT;INFO;Indicates that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index;mission/power/defs.h
11301;0x2c25;SWITCH_HAS_CHANGED;INFO;Indicated that a switch state has changed P1: New switch state, 1 for on, 0 for off | P2: Switch Index;mission/power/defs.h
11302;0x2c26;SWITCHING_Q7S_DENIED;MEDIUM;No description;mission/power/defs.h
@ -133,6 +134,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
11802;0x2e1a;RESET_OCCURED;LOW;No description;mission/acs/rwHelpers.h
11901;0x2e7d;BOOTING_FIRMWARE_FAILED_EVENT;LOW;Failed to boot firmware;mission/acs/str/StarTrackerHandler.h
11902;0x2e7e;BOOTING_BOOTLOADER_FAILED_EVENT;LOW;Failed to boot star tracker into bootloader mode;mission/acs/str/StarTrackerHandler.h
11903;0x2e7f;COM_ERROR_REPLY_RECEIVED;LOW;Received COM error. P1: Communication Error ID (datasheet p32);mission/acs/str/StarTrackerHandler.h
12001;0x2ee1;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;linux/payload/PlocSupervisorHandler.h
12002;0x2ee2;SUPV_UNKNOWN_TM;LOW;Unhandled event. P1: APID, P2: Service ID;linux/payload/PlocSupervisorHandler.h
12003;0x2ee3;SUPV_UNINIMPLEMENTED_TM;LOW;No description;linux/payload/PlocSupervisorHandler.h
@ -160,6 +162,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
12412;0x307c;PDEC_RESET_FAILED;HIGH;Failed to pull PDEC reset to low;linux/ipcore/pdec.h
12413;0x307d;OPEN_IRQ_FILE_FAILED;HIGH;Failed to open the IRQ uio file;linux/ipcore/pdec.h
12414;0x307e;PDEC_INIT_FAILED;HIGH;PDEC initialization failed. This might also be due to the persistent confiuration never becoming available, for example due to SD card issues.;linux/ipcore/pdec.h
12415;0x307f;PDEC_CONFIG_CORRUPTED;HIGH;The PDEC configuration area has been corrupted P1: The first configuration word P2: The second configuration word;linux/ipcore/pdec.h
12500;0x30d4;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;linux/acs/StrComHandler.h
12501;0x30d5;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;linux/acs/StrComHandler.h
12502;0x30d6;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;linux/acs/StrComHandler.h
@ -254,6 +257,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
13800;0x35e8;MISSING_PACKET;LOW;No description;mission/payload/scexHelpers.h
13801;0x35e9;EXPERIMENT_TIMEDOUT;LOW;No description;mission/payload/scexHelpers.h
13802;0x35ea;MULTI_PACKET_COMMAND_DONE;INFO;No description;mission/payload/scexHelpers.h
13803;0x35eb;FS_UNUSABLE;LOW;No description;mission/payload/scexHelpers.h
13901;0x364d;SET_CONFIGFILEVALUE_FAILED;MEDIUM;No description;mission/utility/GlobalConfigHandler.h
13902;0x364e;GET_CONFIGFILEVALUE_FAILED;MEDIUM;No description;mission/utility/GlobalConfigHandler.h
13903;0x364f;INSERT_CONFIGFILEVALUE_FAILED;MEDIUM;No description;mission/utility/GlobalConfigHandler.h
@ -272,6 +276,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
14011;0x36bb;I2C_REBOOT;HIGH;I2C is unavailable. Recovery did not work, performing full reboot.;mission/sysDefs.h
14012;0x36bc;PDEC_REBOOT;HIGH;PDEC recovery through reset was not possible, performing full reboot.;mission/sysDefs.h
14013;0x36bd;FIRMWARE_INFO;INFO;Version information of the firmware (not OBSW). P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash P2: First four letters of Git SHA is the last byte of P1 is set.;mission/sysDefs.h
14014;0x36be;ACTIVE_SD_INFO;INFO;Active SD card info. SD States: 0: OFF, 1: ON, 2: MOUNTED. P1: Active SD Card Index, 0 if none is active P2: First two bytes: SD state of SD card 0, last two bytes SD state of SD card 1;mission/sysDefs.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
@ -280,6 +285,9 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
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
14108;0x371c;MGT_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
14109;0x371d;TCS_SWITCHING_HEATER_ON;INFO;P1: Module index. P2: Heater index;mission/controller/tcsDefs.h
14110;0x371e;TCS_SWITCHING_HEATER_OFF;INFO;P1: Module index. P2: Heater index;mission/controller/tcsDefs.h
14111;0x371f;TCS_HEATER_MAX_BURN_TIME_REACHED;MEDIUM;P1: Heater index. P2: Maximum burn time for heater.;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
@ -295,3 +303,5 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
14312;0x37e8;DUMP_MISC_CANCELLED;LOW;P1: Number of dumped packets. P2: Total dumped bytes.;mission/persistentTmStoreDefs.h
14313;0x37e9;DUMP_HK_CANCELLED;LOW;P1: Number of dumped packets. P2: Total dumped bytes.;mission/persistentTmStoreDefs.h
14314;0x37ea;DUMP_CFDP_CANCELLED;LOW;P1: Number of dumped packets. P2: Total dumped bytes.;mission/persistentTmStoreDefs.h
14500;0x38a4;TEMPERATURE_ALL_ONES_START;MEDIUM;Detected invalid values, starting invalid message counting;mission/acs/SusHandler.h
14501;0x38a5;TEMPERATURE_ALL_ONES_RECOVERY;INFO;Detected valid values again, resetting invalid message counter. P1: Invalid message counter.;mission/acs/SusHandler.h

1 Event ID (dec) Event ID (hex) Name Severity Description File Path
94 11205 0x2bc5 MEKF_AUTOMATIC_RESET INFO MEKF performed an automatic reset after detection of nonfinite values. mission/acs/defs.h
95 11206 0x2bc6 MEKF_INVALID_MODE_VIOLATION HIGH MEKF was not able to compute a solution during any pointing ACS mode for a prolonged time. mission/acs/defs.h
96 11207 0x2bc7 SAFE_MODE_CONTROLLER_FAILURE HIGH The ACS safe mode controller was not able to compute a solution and has failed. P1: Missing information about magnetic field, P2: Missing information about rotational rate mission/acs/defs.h
97 11208 0x2bc8 TLE_TOO_OLD INFO The TLE for the SGP4 Propagator has become too old. mission/acs/defs.h
98 11300 0x2c24 SWITCH_CMD_SENT INFO Indicates that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index mission/power/defs.h
99 11301 0x2c25 SWITCH_HAS_CHANGED INFO Indicated that a switch state has changed P1: New switch state, 1 for on, 0 for off | P2: Switch Index mission/power/defs.h
100 11302 0x2c26 SWITCHING_Q7S_DENIED MEDIUM No description mission/power/defs.h
134 11802 0x2e1a RESET_OCCURED LOW No description mission/acs/rwHelpers.h
135 11901 0x2e7d BOOTING_FIRMWARE_FAILED_EVENT LOW Failed to boot firmware mission/acs/str/StarTrackerHandler.h
136 11902 0x2e7e BOOTING_BOOTLOADER_FAILED_EVENT LOW Failed to boot star tracker into bootloader mode mission/acs/str/StarTrackerHandler.h
137 11903 0x2e7f COM_ERROR_REPLY_RECEIVED LOW Received COM error. P1: Communication Error ID (datasheet p32) mission/acs/str/StarTrackerHandler.h
138 12001 0x2ee1 SUPV_MEMORY_READ_RPT_CRC_FAILURE LOW PLOC supervisor crc failure in telemetry packet linux/payload/PlocSupervisorHandler.h
139 12002 0x2ee2 SUPV_UNKNOWN_TM LOW Unhandled event. P1: APID, P2: Service ID linux/payload/PlocSupervisorHandler.h
140 12003 0x2ee3 SUPV_UNINIMPLEMENTED_TM LOW No description linux/payload/PlocSupervisorHandler.h
162 12412 0x307c PDEC_RESET_FAILED HIGH Failed to pull PDEC reset to low linux/ipcore/pdec.h
163 12413 0x307d OPEN_IRQ_FILE_FAILED HIGH Failed to open the IRQ uio file linux/ipcore/pdec.h
164 12414 0x307e PDEC_INIT_FAILED HIGH PDEC initialization failed. This might also be due to the persistent confiuration never becoming available, for example due to SD card issues. linux/ipcore/pdec.h
165 12415 0x307f PDEC_CONFIG_CORRUPTED HIGH The PDEC configuration area has been corrupted P1: The first configuration word P2: The second configuration word linux/ipcore/pdec.h
166 12500 0x30d4 IMAGE_UPLOAD_FAILED LOW Image upload failed linux/acs/StrComHandler.h
167 12501 0x30d5 IMAGE_DOWNLOAD_FAILED LOW Image download failed linux/acs/StrComHandler.h
168 12502 0x30d6 IMAGE_UPLOAD_SUCCESSFUL LOW Uploading image to star tracker was successfulop linux/acs/StrComHandler.h
257 13800 0x35e8 MISSING_PACKET LOW No description mission/payload/scexHelpers.h
258 13801 0x35e9 EXPERIMENT_TIMEDOUT LOW No description mission/payload/scexHelpers.h
259 13802 0x35ea MULTI_PACKET_COMMAND_DONE INFO No description mission/payload/scexHelpers.h
260 13803 0x35eb FS_UNUSABLE LOW No description mission/payload/scexHelpers.h
261 13901 0x364d SET_CONFIGFILEVALUE_FAILED MEDIUM No description mission/utility/GlobalConfigHandler.h
262 13902 0x364e GET_CONFIGFILEVALUE_FAILED MEDIUM No description mission/utility/GlobalConfigHandler.h
263 13903 0x364f INSERT_CONFIGFILEVALUE_FAILED MEDIUM No description mission/utility/GlobalConfigHandler.h
276 14011 0x36bb I2C_REBOOT HIGH I2C is unavailable. Recovery did not work, performing full reboot. mission/sysDefs.h
277 14012 0x36bc PDEC_REBOOT HIGH PDEC recovery through reset was not possible, performing full reboot. mission/sysDefs.h
278 14013 0x36bd FIRMWARE_INFO INFO Version information of the firmware (not OBSW). P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash P2: First four letters of Git SHA is the last byte of P1 is set. mission/sysDefs.h
279 14014 0x36be ACTIVE_SD_INFO INFO Active SD card info. SD States: 0: OFF, 1: ON, 2: MOUNTED. P1: Active SD Card Index, 0 if none is active P2: First two bytes: SD state of SD card 0, last two bytes SD state of SD card 1 mission/sysDefs.h
280 14100 0x3714 NO_VALID_SENSOR_TEMPERATURE MEDIUM No description mission/controller/tcsDefs.h
281 14101 0x3715 NO_HEALTHY_HEATER_AVAILABLE MEDIUM No description mission/controller/tcsDefs.h
282 14102 0x3716 SYRLINKS_OVERHEATING HIGH No description mission/controller/tcsDefs.h
285 14106 0x371a PCDU_SYSTEM_OVERHEATING HIGH No description mission/controller/tcsDefs.h
286 14107 0x371b HEATER_NOT_OFF_FOR_OFF_MODE MEDIUM No description mission/controller/tcsDefs.h
287 14108 0x371c MGT_OVERHEATING HIGH No description mission/controller/tcsDefs.h
288 14109 0x371d TCS_SWITCHING_HEATER_ON INFO P1: Module index. P2: Heater index mission/controller/tcsDefs.h
289 14110 0x371e TCS_SWITCHING_HEATER_OFF INFO P1: Module index. P2: Heater index mission/controller/tcsDefs.h
290 14111 0x371f TCS_HEATER_MAX_BURN_TIME_REACHED MEDIUM P1: Heater index. P2: Maximum burn time for heater. mission/controller/tcsDefs.h
291 14201 0x3779 TX_TIMER_EXPIRED INFO The transmit timer to protect the Syrlinks expired P1: The current timer value mission/system/com/ComSubsystem.h
292 14202 0x377a BIT_LOCK_TX_ON INFO Transmitter will be turned on due to detection of bitlock mission/system/com/ComSubsystem.h
293 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
303 14312 0x37e8 DUMP_MISC_CANCELLED LOW P1: Number of dumped packets. P2: Total dumped bytes. mission/persistentTmStoreDefs.h
304 14313 0x37e9 DUMP_HK_CANCELLED LOW P1: Number of dumped packets. P2: Total dumped bytes. mission/persistentTmStoreDefs.h
305 14314 0x37ea DUMP_CFDP_CANCELLED LOW P1: Number of dumped packets. P2: Total dumped bytes. mission/persistentTmStoreDefs.h
306 14500 0x38a4 TEMPERATURE_ALL_ONES_START MEDIUM Detected invalid values, starting invalid message counting mission/acs/SusHandler.h
307 14501 0x38a5 TEMPERATURE_ALL_ONES_RECOVERY INFO Detected valid values again, resetting invalid message counter. P1: Invalid message counter. mission/acs/SusHandler.h

View File

@ -60,3 +60,4 @@
142;COM_SUBSYSTEM
143;PERSISTENT_TM_STORE
144;SYRLINKS_COM
145;SUS_HANDLER

1 22 MEMORY
60 142 COM_SUBSYSTEM
61 143 PERSISTENT_TM_STORE
62 144 SYRLINKS_COM
63 145 SUS_HANDLER

View File

@ -54,9 +54,13 @@ class BspConfig:
# Store this file in the root of the generators folder
self.csv_filename = Path(f"{ROOT_DIR}/{self.bsp_dir_name}_events.csv")
self.subsystems_csv_filename = Path(f"{ROOT_DIR}/{self.bsp_dir_name}_subsystems.csv")
self.subsystems_csv_filename = Path(
f"{ROOT_DIR}/{self.bsp_dir_name}_subsystems.csv"
)
self.csv_copy_dest = Path(f"{OBSW_ROOT_DIR}/tmtc/eive_tmtc/config/events.csv")
self.subsystem_csv_copy_dest = Path(f"{OBSW_ROOT_DIR}/tmtc/eive_tmtc/config/subsystems.csv")
self.subsystem_csv_copy_dest = Path(
f"{OBSW_ROOT_DIR}/tmtc/eive_tmtc/config/subsystems.csv"
)
if (
self.bsp_select == BspType.BSP_Q7S

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 296 translations.
* @brief Auto-generated event translation file. Contains 306 translations.
* @details
* Generated on: 2023-06-21 19:01:02
* Generated on: 2023-09-12 10:05:17
*/
#include "translateEvents.h"
@ -100,6 +100,7 @@ const char *MEKF_RECOVERY_STRING = "MEKF_RECOVERY";
const char *MEKF_AUTOMATIC_RESET_STRING = "MEKF_AUTOMATIC_RESET";
const char *MEKF_INVALID_MODE_VIOLATION_STRING = "MEKF_INVALID_MODE_VIOLATION";
const char *SAFE_MODE_CONTROLLER_FAILURE_STRING = "SAFE_MODE_CONTROLLER_FAILURE";
const char *TLE_TOO_OLD_STRING = "TLE_TOO_OLD";
const char *SWITCH_CMD_SENT_STRING = "SWITCH_CMD_SENT";
const char *SWITCH_HAS_CHANGED_STRING = "SWITCH_HAS_CHANGED";
const char *SWITCHING_Q7S_DENIED_STRING = "SWITCHING_Q7S_DENIED";
@ -139,6 +140,7 @@ const char *ERROR_STATE_STRING = "ERROR_STATE";
const char *RESET_OCCURED_STRING = "RESET_OCCURED";
const char *BOOTING_FIRMWARE_FAILED_EVENT_STRING = "BOOTING_FIRMWARE_FAILED_EVENT";
const char *BOOTING_BOOTLOADER_FAILED_EVENT_STRING = "BOOTING_BOOTLOADER_FAILED_EVENT";
const char *COM_ERROR_REPLY_RECEIVED_STRING = "COM_ERROR_REPLY_RECEIVED";
const char *SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING = "SUPV_MEMORY_READ_RPT_CRC_FAILURE";
const char *SUPV_UNKNOWN_TM_STRING = "SUPV_UNKNOWN_TM";
const char *SUPV_UNINIMPLEMENTED_TM_STRING = "SUPV_UNINIMPLEMENTED_TM";
@ -166,6 +168,7 @@ const char *PDEC_TRYING_RESET_NO_INIT_STRING = "PDEC_TRYING_RESET_NO_INIT";
const char *PDEC_RESET_FAILED_STRING = "PDEC_RESET_FAILED";
const char *OPEN_IRQ_FILE_FAILED_STRING = "OPEN_IRQ_FILE_FAILED";
const char *PDEC_INIT_FAILED_STRING = "PDEC_INIT_FAILED";
const char *PDEC_CONFIG_CORRUPTED_STRING = "PDEC_CONFIG_CORRUPTED";
const char *IMAGE_UPLOAD_FAILED_STRING = "IMAGE_UPLOAD_FAILED";
const char *IMAGE_DOWNLOAD_FAILED_STRING = "IMAGE_DOWNLOAD_FAILED";
const char *IMAGE_UPLOAD_SUCCESSFUL_STRING = "IMAGE_UPLOAD_SUCCESSFUL";
@ -260,6 +263,7 @@ const char *TX_OFF_STRING = "TX_OFF";
const char *MISSING_PACKET_STRING = "MISSING_PACKET";
const char *EXPERIMENT_TIMEDOUT_STRING = "EXPERIMENT_TIMEDOUT";
const char *MULTI_PACKET_COMMAND_DONE_STRING = "MULTI_PACKET_COMMAND_DONE";
const char *FS_UNUSABLE_STRING = "FS_UNUSABLE";
const char *SET_CONFIGFILEVALUE_FAILED_STRING = "SET_CONFIGFILEVALUE_FAILED";
const char *GET_CONFIGFILEVALUE_FAILED_STRING = "GET_CONFIGFILEVALUE_FAILED";
const char *INSERT_CONFIGFILEVALUE_FAILED_STRING = "INSERT_CONFIGFILEVALUE_FAILED";
@ -278,6 +282,7 @@ const char *TRYING_I2C_RECOVERY_STRING = "TRYING_I2C_RECOVERY";
const char *I2C_REBOOT_STRING = "I2C_REBOOT";
const char *PDEC_REBOOT_STRING = "PDEC_REBOOT";
const char *FIRMWARE_INFO_STRING = "FIRMWARE_INFO";
const char *ACTIVE_SD_INFO_STRING = "ACTIVE_SD_INFO";
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";
@ -286,6 +291,9 @@ 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 *MGT_OVERHEATING_STRING = "MGT_OVERHEATING";
const char *TCS_SWITCHING_HEATER_ON_STRING = "TCS_SWITCHING_HEATER_ON";
const char *TCS_SWITCHING_HEATER_OFF_STRING = "TCS_SWITCHING_HEATER_OFF";
const char *TCS_HEATER_MAX_BURN_TIME_REACHED_STRING = "TCS_HEATER_MAX_BURN_TIME_REACHED";
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";
@ -301,6 +309,8 @@ const char *DUMP_NOK_CANCELLED_STRING = "DUMP_NOK_CANCELLED";
const char *DUMP_MISC_CANCELLED_STRING = "DUMP_MISC_CANCELLED";
const char *DUMP_HK_CANCELLED_STRING = "DUMP_HK_CANCELLED";
const char *DUMP_CFDP_CANCELLED_STRING = "DUMP_CFDP_CANCELLED";
const char *TEMPERATURE_ALL_ONES_START_STRING = "TEMPERATURE_ALL_ONES_START";
const char *TEMPERATURE_ALL_ONES_RECOVERY_STRING = "TEMPERATURE_ALL_ONES_RECOVERY";
const char *translateEvents(Event event) {
switch ((event & 0xFFFF)) {
@ -494,6 +504,8 @@ const char *translateEvents(Event event) {
return MEKF_INVALID_MODE_VIOLATION_STRING;
case (11207):
return SAFE_MODE_CONTROLLER_FAILURE_STRING;
case (11208):
return TLE_TOO_OLD_STRING;
case (11300):
return SWITCH_CMD_SENT_STRING;
case (11301):
@ -572,6 +584,8 @@ const char *translateEvents(Event event) {
return BOOTING_FIRMWARE_FAILED_EVENT_STRING;
case (11902):
return BOOTING_BOOTLOADER_FAILED_EVENT_STRING;
case (11903):
return COM_ERROR_REPLY_RECEIVED_STRING;
case (12001):
return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING;
case (12002):
@ -626,6 +640,8 @@ const char *translateEvents(Event event) {
return OPEN_IRQ_FILE_FAILED_STRING;
case (12414):
return PDEC_INIT_FAILED_STRING;
case (12415):
return PDEC_CONFIG_CORRUPTED_STRING;
case (12500):
return IMAGE_UPLOAD_FAILED_STRING;
case (12501):
@ -814,6 +830,8 @@ const char *translateEvents(Event event) {
return EXPERIMENT_TIMEDOUT_STRING;
case (13802):
return MULTI_PACKET_COMMAND_DONE_STRING;
case (13803):
return FS_UNUSABLE_STRING;
case (13901):
return SET_CONFIGFILEVALUE_FAILED_STRING;
case (13902):
@ -850,6 +868,8 @@ const char *translateEvents(Event event) {
return PDEC_REBOOT_STRING;
case (14013):
return FIRMWARE_INFO_STRING;
case (14014):
return ACTIVE_SD_INFO_STRING;
case (14100):
return NO_VALID_SENSOR_TEMPERATURE_STRING;
case (14101):
@ -866,6 +886,12 @@ const char *translateEvents(Event event) {
return HEATER_NOT_OFF_FOR_OFF_MODE_STRING;
case (14108):
return MGT_OVERHEATING_STRING;
case (14109):
return TCS_SWITCHING_HEATER_ON_STRING;
case (14110):
return TCS_SWITCHING_HEATER_OFF_STRING;
case (14111):
return TCS_HEATER_MAX_BURN_TIME_REACHED_STRING;
case (14201):
return TX_TIMER_EXPIRED_STRING;
case (14202):
@ -896,6 +922,10 @@ const char *translateEvents(Event event) {
return DUMP_HK_CANCELLED_STRING;
case (14314):
return DUMP_CFDP_CANCELLED_STRING;
case (14500):
return TEMPERATURE_ALL_ONES_START_STRING;
case (14501):
return TEMPERATURE_ALL_ONES_RECOVERY_STRING;
default:
return "UNKNOWN_EVENT";
}

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file.
* @details
* Contains 175 translations.
* Generated on: 2023-06-21 19:01:02
* Generated on: 2023-09-12 10:05:17
*/
#include "translateObjects.h"

View File

@ -767,6 +767,9 @@ void AcsBoardPolling::mgmRm3100Handler(MgmRm3100& mgm) {
mgm.replyResult = result;
return;
}
// For some reason, bit 1 is sometimes set on the reply, even if it is not set for the
// command.. Ignore it for now by clearing it.
rawReply[1] &= ~(1 << 1);
if (rawReply[1] != mgmRm3100::CMM_VALUE) {
sif::error << "AcsBoardPolling: MGM RM3100 read back CMM invalid" << std::endl;
mgm.replyResult = result;

View File

@ -21,6 +21,7 @@ GpsHyperionLinuxController::GpsHyperionLinuxController(object_id_t objectId, obj
bool enableHkSets, bool debugHyperionGps)
: ExtendedControllerBase(objectId),
gpsSet(this),
skyviewSet(this),
enableHkSets(enableHkSets),
debugHyperionGps(debugHyperionGps) {}
@ -29,7 +30,17 @@ GpsHyperionLinuxController::~GpsHyperionLinuxController() {
gps_close(&gps);
}
LocalPoolDataSetBase *GpsHyperionLinuxController::getDataSetHandle(sid_t sid) { return &gpsSet; }
LocalPoolDataSetBase *GpsHyperionLinuxController::getDataSetHandle(sid_t sid) {
switch (sid.ownerSetId) {
case GpsHyperion::CORE_DATASET:
return &gpsSet;
case GpsHyperion::SKYVIEW_DATASET:
return &skyviewSet;
default:
return nullptr;
}
return nullptr;
}
ReturnValue_t GpsHyperionLinuxController::checkModeCommand(Mode_t mode, Submode_t submode,
uint32_t *msToReachTheMode) {
@ -90,6 +101,13 @@ ReturnValue_t GpsHyperionLinuxController::initializeLocalDataPool(
localDataPoolMap.emplace(GpsHyperion::SATS_IN_VIEW, new PoolEntry<uint8_t>());
localDataPoolMap.emplace(GpsHyperion::FIX_MODE, new PoolEntry<uint8_t>());
poolManager.subscribeForRegularPeriodicPacket({gpsSet.getSid(), enableHkSets, 30.0});
localDataPoolMap.emplace(GpsHyperion::SKYVIEW_UNIX_SECONDS, new PoolEntry<double>());
localDataPoolMap.emplace(GpsHyperion::PRN_ID, new PoolEntry<int16_t>());
localDataPoolMap.emplace(GpsHyperion::AZIMUTH, new PoolEntry<int16_t>());
localDataPoolMap.emplace(GpsHyperion::ELEVATION, new PoolEntry<int16_t>());
localDataPoolMap.emplace(GpsHyperion::SIGNAL2NOISE, new PoolEntry<double>());
localDataPoolMap.emplace(GpsHyperion::USED, new PoolEntry<uint8_t>());
poolManager.subscribeForRegularPeriodicPacket({skyviewSet.getSid(), false, 120.0});
return returnvalue::OK;
}
@ -166,30 +184,32 @@ bool GpsHyperionLinuxController::readGpsDataFromGpsd() {
if (mode == MODE_OFF) {
return false;
}
unsigned int readIdx = 0;
if (readMode == ReadModes::SOCKET) {
// Poll the GPS.
if (gps_waiting(&gps, 0)) {
if (-1 == gps_read(&gps)) {
while (gps_waiting(&gps, 0)) {
int retval = gps_read(&gps);
if (retval < 0) {
readError();
return false;
}
oneShotSwitches.gpsReadFailedSwitch = true;
ReturnValue_t result = handleGpsReadData();
if (result == returnvalue::OK) {
return true;
} else {
return false;
readIdx++;
if (readIdx >= 40) {
sif::warning << "GpsHyperionLinuxController: Received " << readIdx
<< " GPSD message consecutively" << std::endl;
break;
}
noModeSetCntr = 0;
} else {
return false;
}
if (readIdx > 0) {
oneShotSwitches.gpsReadFailedSwitch = true;
handleGpsReadData();
}
} else if (readMode == ReadModes::SHM) {
sif::error << "GpsHyperionLinuxController::readGpsDataFromGpsdPermanentLoop: "
"SHM read not implemented"
<< std::endl;
}
return true;
return false;
}
ReturnValue_t GpsHyperionLinuxController::handleGpsReadData() {
@ -208,7 +228,15 @@ ReturnValue_t GpsHyperionLinuxController::handleGpsReadData() {
return returnvalue::FAILED;
}
}
ReturnValue_t result = handleCoreTelemetry(modeIsSet);
if (result != returnvalue::OK) {
return result;
}
result = handleSkyviewTelemetry();
return result;
}
ReturnValue_t GpsHyperionLinuxController::handleCoreTelemetry(bool modeIsSet) {
PoolReadGuard pg(&gpsSet);
if (pg.getReadResult() != returnvalue::OK) {
#if FSFW_VERBOSE_LEVEL >= 1
@ -236,7 +264,9 @@ ReturnValue_t GpsHyperionLinuxController::handleGpsReadData() {
}
}
if (gpsSet.fixMode.value != newFix) {
#if OBSW_Q7S_EM != 1
triggerEvent(GpsHyperion::GPS_FIX_CHANGE, gpsSet.fixMode.value, newFix);
#endif
}
gpsSet.fixMode = newFix;
gpsSet.fixMode.setValid(modeIsSet);
@ -369,6 +399,22 @@ ReturnValue_t GpsHyperionLinuxController::handleGpsReadData() {
return returnvalue::OK;
}
ReturnValue_t GpsHyperionLinuxController::handleSkyviewTelemetry() {
PoolReadGuard pg(&skyviewSet);
if (pg.getReadResult() != returnvalue::OK) {
return returnvalue::FAILED;
}
skyviewSet.unixSeconds.value = gps.skyview_time;
for (int sat = 0; sat < GpsHyperion::MAX_SATELLITES; sat++) {
skyviewSet.prn_id.value[sat] = gps.skyview[sat].PRN;
skyviewSet.azimuth.value[sat] = gps.skyview[sat].azimuth;
skyviewSet.elevation.value[sat] = gps.skyview[sat].elevation;
skyviewSet.signal2noise.value[sat] = gps.skyview[sat].ss;
skyviewSet.used.value[sat] = gps.skyview[sat].used;
}
return returnvalue::OK;
}
void GpsHyperionLinuxController::overwriteTimeIfNotSane(timeval time, bool validFix) {
if (not timeInit and validFix) {
if (not utility::timeSanityCheck()) {

View File

@ -54,9 +54,12 @@ class GpsHyperionLinuxController : public ExtendedControllerBase {
LocalDataPoolManager& poolManager) override;
ReturnValue_t handleGpsReadData();
ReturnValue_t handleCoreTelemetry(bool modeIsSet);
ReturnValue_t handleSkyviewTelemetry();
private:
GpsPrimaryDataset gpsSet;
SkyviewDataset skyviewSet;
gps_data_t gps = {};
bool enableHkSets = false;
const char* currentClientBuf = nullptr;
@ -81,7 +84,6 @@ class GpsHyperionLinuxController : public ExtendedControllerBase {
} oneShotSwitches;
bool debugHyperionGps = false;
int32_t noModeSetCntr = 0;
// Returns true if the function should be called again or false if other
// controller handling can be done.

View File

@ -2,6 +2,7 @@
#include <fcntl.h>
#include <fsfw/filesystem/HasFileSystemIF.h>
#include <fsfw/globalfunctions/arrayprinter.h>
#include <fsfw/tasks/TaskFactory.h>
#include <fsfw/timemanager/Stopwatch.h>
#include <mission/acs/str/strHelpers.h>
@ -23,6 +24,8 @@ extern "C" {
using namespace returnvalue;
static constexpr bool PACKET_WIRETAPPING = false;
StrComHandler::StrComHandler(object_id_t objectId) : SystemObject(objectId) {
lock = MutexFactory::instance()->createMutex();
semaphore.acquire();
@ -52,7 +55,7 @@ ReturnValue_t StrComHandler::performOperation(uint8_t operationCode) {
case InternalState::POLL_ONE_REPLY: {
// Stopwatch watch;
replyTimeout.setTimeout(200);
replyResult = readOneReply(static_cast<uint32_t>(state));
readOneReply(static_cast<uint32_t>(state));
{
MutexGuard mg(lock);
replyWasReceived = true;
@ -680,6 +683,10 @@ ReturnValue_t StrComHandler::sendMessage(CookieIF* cookie, const uint8_t* sendDa
const uint8_t* txFrame;
size_t frameLen;
datalinkLayer.encodeFrame(sendData, sendLen, &txFrame, frameLen);
if (PACKET_WIRETAPPING) {
sif::debug << "Sending STR frame" << std::endl;
arrayprinter::print(txFrame, frameLen);
}
ssize_t bytesWritten = write(serialPort, txFrame, frameLen);
if (bytesWritten != static_cast<ssize_t>(frameLen)) {
sif::warning << "StrComHandler: Sending packet failed" << std::endl;
@ -709,13 +716,11 @@ ReturnValue_t StrComHandler::requestReceiveMessage(CookieIF* cookie, size_t requ
}
ReturnValue_t StrComHandler::readReceivedMessage(CookieIF* cookie, uint8_t** buffer, size_t* size) {
// Consider it a configuration error if the task is not done with a command -> reply cycle
// in time.
bool replyWasReceived = false;
{
MutexGuard mg(lock);
if (state != InternalState::SLEEPING) {
return BUSY;
return returnvalue::OK;
}
replyWasReceived = this->replyWasReceived;
}
@ -728,7 +733,7 @@ ReturnValue_t StrComHandler::readReceivedMessage(CookieIF* cookie, uint8_t** buf
*size = replyLen;
}
replyLen = 0;
return replyResult;
return returnvalue::OK;
}
ReturnValue_t StrComHandler::unlockAndEraseRegions(uint32_t from, uint32_t to) {
@ -782,8 +787,10 @@ ReturnValue_t StrComHandler::handleSerialReception() {
<< std::endl;
return FAILED;
} else if (bytesRead > 0) {
// sif::info << "Received " << bytesRead << " bytes from the STR" << std::endl;
// arrayprinter::print(recBuf.data(), bytesRead);
if (PACKET_WIRETAPPING) {
sif::info << "Received " << bytesRead << " bytes from the STR" << std::endl;
arrayprinter::print(recBuf.data(), bytesRead);
}
datalinkLayer.feedData(recBuf.data(), bytesRead);
}
return OK;
@ -797,6 +804,10 @@ ReturnValue_t StrComHandler::readOneReply(uint32_t failParameter) {
handleSerialReception();
result = datalinkLayer.checkRingBufForFrame(&replyPtr, replyLen);
if (result == returnvalue::OK) {
if (PACKET_WIRETAPPING) {
sif::debug << "Received STR reply frame" << std::endl;
arrayprinter::print(replyPtr, replyLen);
}
return returnvalue::OK;
} else if (result != ArcsecDatalinkLayer::DEC_IN_PROGRESS) {
triggerEvent(STR_HELPER_DEC_ERROR, result, failParameter);

View File

@ -170,18 +170,12 @@ ReturnValue_t SusPolling::handleSusPolling() {
}
MutexGuard mg(ipcLock);
susDevs[idx].ownReply.tempRaw = ((rawReply[0] & 0x0f) << 8) | rawReply[1];
// Reply is all ones. Sensor is probably off or faulty when
// it should not be.
if (susDevs[idx].ownReply.tempRaw == 0x0fff) {
susDevs[idx].replyResult = returnvalue::FAILED;
} else {
susDevs[idx].replyResult = returnvalue::OK;
for (unsigned chIdx = 0; chIdx < 6; chIdx++) {
susDevs[idx].ownReply.channelsRaw[chIdx] =
(rawReply[chIdx * 2 + 2] << 8) | rawReply[chIdx * 2 + 3];
}
susDevs[idx].ownReply.dataWasSet = true;
susDevs[idx].replyResult = returnvalue::OK;
for (unsigned chIdx = 0; chIdx < 6; chIdx++) {
susDevs[idx].ownReply.channelsRaw[chIdx] =
(rawReply[chIdx * 2 + 2] << 8) | rawReply[chIdx * 2 + 3];
}
susDevs[idx].ownReply.dataWasSet = true;
}
}
return OK;

View File

@ -11,7 +11,7 @@
#include <array>
//#include "lwgps/lwgps.h"
// #include "lwgps/lwgps.h"
#include "test/TestTask.h"
class ScexUartReader;

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 296 translations.
* @brief Auto-generated event translation file. Contains 306 translations.
* @details
* Generated on: 2023-06-21 19:01:02
* Generated on: 2023-09-12 10:05:17
*/
#include "translateEvents.h"
@ -100,6 +100,7 @@ const char *MEKF_RECOVERY_STRING = "MEKF_RECOVERY";
const char *MEKF_AUTOMATIC_RESET_STRING = "MEKF_AUTOMATIC_RESET";
const char *MEKF_INVALID_MODE_VIOLATION_STRING = "MEKF_INVALID_MODE_VIOLATION";
const char *SAFE_MODE_CONTROLLER_FAILURE_STRING = "SAFE_MODE_CONTROLLER_FAILURE";
const char *TLE_TOO_OLD_STRING = "TLE_TOO_OLD";
const char *SWITCH_CMD_SENT_STRING = "SWITCH_CMD_SENT";
const char *SWITCH_HAS_CHANGED_STRING = "SWITCH_HAS_CHANGED";
const char *SWITCHING_Q7S_DENIED_STRING = "SWITCHING_Q7S_DENIED";
@ -139,6 +140,7 @@ const char *ERROR_STATE_STRING = "ERROR_STATE";
const char *RESET_OCCURED_STRING = "RESET_OCCURED";
const char *BOOTING_FIRMWARE_FAILED_EVENT_STRING = "BOOTING_FIRMWARE_FAILED_EVENT";
const char *BOOTING_BOOTLOADER_FAILED_EVENT_STRING = "BOOTING_BOOTLOADER_FAILED_EVENT";
const char *COM_ERROR_REPLY_RECEIVED_STRING = "COM_ERROR_REPLY_RECEIVED";
const char *SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING = "SUPV_MEMORY_READ_RPT_CRC_FAILURE";
const char *SUPV_UNKNOWN_TM_STRING = "SUPV_UNKNOWN_TM";
const char *SUPV_UNINIMPLEMENTED_TM_STRING = "SUPV_UNINIMPLEMENTED_TM";
@ -166,6 +168,7 @@ const char *PDEC_TRYING_RESET_NO_INIT_STRING = "PDEC_TRYING_RESET_NO_INIT";
const char *PDEC_RESET_FAILED_STRING = "PDEC_RESET_FAILED";
const char *OPEN_IRQ_FILE_FAILED_STRING = "OPEN_IRQ_FILE_FAILED";
const char *PDEC_INIT_FAILED_STRING = "PDEC_INIT_FAILED";
const char *PDEC_CONFIG_CORRUPTED_STRING = "PDEC_CONFIG_CORRUPTED";
const char *IMAGE_UPLOAD_FAILED_STRING = "IMAGE_UPLOAD_FAILED";
const char *IMAGE_DOWNLOAD_FAILED_STRING = "IMAGE_DOWNLOAD_FAILED";
const char *IMAGE_UPLOAD_SUCCESSFUL_STRING = "IMAGE_UPLOAD_SUCCESSFUL";
@ -260,6 +263,7 @@ const char *TX_OFF_STRING = "TX_OFF";
const char *MISSING_PACKET_STRING = "MISSING_PACKET";
const char *EXPERIMENT_TIMEDOUT_STRING = "EXPERIMENT_TIMEDOUT";
const char *MULTI_PACKET_COMMAND_DONE_STRING = "MULTI_PACKET_COMMAND_DONE";
const char *FS_UNUSABLE_STRING = "FS_UNUSABLE";
const char *SET_CONFIGFILEVALUE_FAILED_STRING = "SET_CONFIGFILEVALUE_FAILED";
const char *GET_CONFIGFILEVALUE_FAILED_STRING = "GET_CONFIGFILEVALUE_FAILED";
const char *INSERT_CONFIGFILEVALUE_FAILED_STRING = "INSERT_CONFIGFILEVALUE_FAILED";
@ -278,6 +282,7 @@ const char *TRYING_I2C_RECOVERY_STRING = "TRYING_I2C_RECOVERY";
const char *I2C_REBOOT_STRING = "I2C_REBOOT";
const char *PDEC_REBOOT_STRING = "PDEC_REBOOT";
const char *FIRMWARE_INFO_STRING = "FIRMWARE_INFO";
const char *ACTIVE_SD_INFO_STRING = "ACTIVE_SD_INFO";
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";
@ -286,6 +291,9 @@ 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 *MGT_OVERHEATING_STRING = "MGT_OVERHEATING";
const char *TCS_SWITCHING_HEATER_ON_STRING = "TCS_SWITCHING_HEATER_ON";
const char *TCS_SWITCHING_HEATER_OFF_STRING = "TCS_SWITCHING_HEATER_OFF";
const char *TCS_HEATER_MAX_BURN_TIME_REACHED_STRING = "TCS_HEATER_MAX_BURN_TIME_REACHED";
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";
@ -301,6 +309,8 @@ const char *DUMP_NOK_CANCELLED_STRING = "DUMP_NOK_CANCELLED";
const char *DUMP_MISC_CANCELLED_STRING = "DUMP_MISC_CANCELLED";
const char *DUMP_HK_CANCELLED_STRING = "DUMP_HK_CANCELLED";
const char *DUMP_CFDP_CANCELLED_STRING = "DUMP_CFDP_CANCELLED";
const char *TEMPERATURE_ALL_ONES_START_STRING = "TEMPERATURE_ALL_ONES_START";
const char *TEMPERATURE_ALL_ONES_RECOVERY_STRING = "TEMPERATURE_ALL_ONES_RECOVERY";
const char *translateEvents(Event event) {
switch ((event & 0xFFFF)) {
@ -494,6 +504,8 @@ const char *translateEvents(Event event) {
return MEKF_INVALID_MODE_VIOLATION_STRING;
case (11207):
return SAFE_MODE_CONTROLLER_FAILURE_STRING;
case (11208):
return TLE_TOO_OLD_STRING;
case (11300):
return SWITCH_CMD_SENT_STRING;
case (11301):
@ -572,6 +584,8 @@ const char *translateEvents(Event event) {
return BOOTING_FIRMWARE_FAILED_EVENT_STRING;
case (11902):
return BOOTING_BOOTLOADER_FAILED_EVENT_STRING;
case (11903):
return COM_ERROR_REPLY_RECEIVED_STRING;
case (12001):
return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING;
case (12002):
@ -626,6 +640,8 @@ const char *translateEvents(Event event) {
return OPEN_IRQ_FILE_FAILED_STRING;
case (12414):
return PDEC_INIT_FAILED_STRING;
case (12415):
return PDEC_CONFIG_CORRUPTED_STRING;
case (12500):
return IMAGE_UPLOAD_FAILED_STRING;
case (12501):
@ -814,6 +830,8 @@ const char *translateEvents(Event event) {
return EXPERIMENT_TIMEDOUT_STRING;
case (13802):
return MULTI_PACKET_COMMAND_DONE_STRING;
case (13803):
return FS_UNUSABLE_STRING;
case (13901):
return SET_CONFIGFILEVALUE_FAILED_STRING;
case (13902):
@ -850,6 +868,8 @@ const char *translateEvents(Event event) {
return PDEC_REBOOT_STRING;
case (14013):
return FIRMWARE_INFO_STRING;
case (14014):
return ACTIVE_SD_INFO_STRING;
case (14100):
return NO_VALID_SENSOR_TEMPERATURE_STRING;
case (14101):
@ -866,6 +886,12 @@ const char *translateEvents(Event event) {
return HEATER_NOT_OFF_FOR_OFF_MODE_STRING;
case (14108):
return MGT_OVERHEATING_STRING;
case (14109):
return TCS_SWITCHING_HEATER_ON_STRING;
case (14110):
return TCS_SWITCHING_HEATER_OFF_STRING;
case (14111):
return TCS_HEATER_MAX_BURN_TIME_REACHED_STRING;
case (14201):
return TX_TIMER_EXPIRED_STRING;
case (14202):
@ -896,6 +922,10 @@ const char *translateEvents(Event event) {
return DUMP_HK_CANCELLED_STRING;
case (14314):
return DUMP_CFDP_CANCELLED_STRING;
case (14500):
return TEMPERATURE_ALL_ONES_START_STRING;
case (14501):
return TEMPERATURE_ALL_ONES_RECOVERY_STRING;
default:
return "UNKNOWN_EVENT";
}

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file.
* @details
* Contains 175 translations.
* Generated on: 2023-06-21 19:01:02
* Generated on: 2023-09-12 10:05:17
*/
#include "translateObjects.h"

View File

@ -16,9 +16,9 @@ AxiPtmeConfig::AxiPtmeConfig(object_id_t objectId, std::string axiUio, int mapNu
AxiPtmeConfig::~AxiPtmeConfig() {}
ReturnValue_t AxiPtmeConfig::initialize() {
ReturnValue_t result = returnvalue::OK;
UioMapper uioMapper(axiUio, mapNum);
result = uioMapper.getMappedAdress(&baseAddress, UioMapper::Permissions::READ_WRITE);
ReturnValue_t result =
uioMapper.getMappedAdress(&baseAddress, UioMapper::Permissions::READ_WRITE);
if (result != returnvalue::OK) {
return result;
}
@ -26,8 +26,7 @@ ReturnValue_t AxiPtmeConfig::initialize() {
}
ReturnValue_t AxiPtmeConfig::writeCaduRateReg(uint8_t rateVal) {
ReturnValue_t result = returnvalue::OK;
result = mutex->lockMutex(timeoutType, mutexTimeout);
ReturnValue_t result = mutex->lockMutex(timeoutType, mutexTimeout);
if (result != returnvalue::OK) {
sif::warning << "AxiPtmeConfig::writeCaduRateReg: Failed to lock mutex" << std::endl;
return returnvalue::FAILED;
@ -41,6 +40,11 @@ ReturnValue_t AxiPtmeConfig::writeCaduRateReg(uint8_t rateVal) {
return returnvalue::OK;
}
uint8_t AxiPtmeConfig::readCaduRateReg() {
MutexGuard mg(mutex);
return static_cast<uint8_t>(*(baseAddress + CADU_BITRATE_REG));
}
void AxiPtmeConfig::enableTxclockManipulator() {
writeBit(COMMON_CONFIG_REG, true, BitPos::EN_TX_CLK_MANIPULATOR);
}

View File

@ -38,6 +38,7 @@ class AxiPtmeConfig : public SystemObject {
* frequency of the clock connected to the bit clock input of PTME.
*/
ReturnValue_t writeCaduRateReg(uint8_t rateVal);
uint8_t readCaduRateReg();
/**
* @brief Next to functions control the tx clock manipulator component

View File

@ -7,20 +7,16 @@
#include "fsfw/serviceinterface/ServiceInterface.h"
PapbVcInterface::PapbVcInterface(LinuxLibgpioIF* gpioComIF, gpioId_t papbBusyId,
gpioId_t papbEmptyId, std::string uioFile, int mapNum)
: gpioComIF(gpioComIF),
papbBusyId(papbBusyId),
papbEmptyId(papbEmptyId),
uioFile(std::move(uioFile)),
mapNum(mapNum) {}
PapbVcInterface::PapbVcInterface(LinuxLibgpioIF* gpioComIF, gpioId_t papbEmptyId,
std::string uioFile, int mapNum)
: gpioComIF(gpioComIF), papbEmptyId(papbEmptyId), uioFile(std::move(uioFile)), mapNum(mapNum) {}
PapbVcInterface::~PapbVcInterface() {}
ReturnValue_t PapbVcInterface::initialize() {
UioMapper uioMapper(uioFile, mapNum);
ReturnValue_t result = uioMapper.getMappedAdress(const_cast<uint32_t**>(&vcBaseReg),
UioMapper::Permissions::WRITE_ONLY);
UioMapper::Permissions::READ_WRITE);
if (result != returnvalue::OK) {
return result;
}
@ -32,63 +28,27 @@ ReturnValue_t PapbVcInterface::write(const uint8_t* data, size_t size) {
if (size < 4) {
return returnvalue::FAILED;
}
if (pollInterfaceReadiness(0, true) == returnvalue::OK) {
if (pollReadyForPacket()) {
startPacketTransfer(ByteWidthCfg::ONE);
} else {
return DirectTmSinkIF::IS_BUSY;
}
// TODO: This should work but does not.. :(
// size_t idx = 0;
// while (idx < size) {
//
// nanosleep(&BETWEEN_POLL_DELAY, &remDelay);
// if ((size - idx) < 4) {
// *vcBaseReg = CONFIG_DATA_INPUT | (size - idx - 1);
// usleep(1);
// }
// if (pollPapbBusySignal(2) == returnvalue::OK) {
// // vcBaseReg + DATA_REG_OFFSET + 3 = static_cast<uint8_t>(data + idx);
// // vcBaseReg + DATA_REG_OFFSET + 2 = static_cast<uint8_t>(data + idx + 1);
// // vcBaseReg + DATA_REG_OFFSET + 1 = static_cast<uint8_t>(data + idx + 2);
// // vcBaseReg + DATA_REG_OFFSET = static_cast<uint8_t>(data + idx + 3);
//
// // std::memcpy((vcBaseReg + DATA_REG_OFFSET), data + idx , nextWriteSize);
// *(vcBaseReg + DATA_REG_OFFSET) = *reinterpret_cast<const uint32_t*>(data + idx);
// //uint8_t* byteReg = reinterpret_cast<uint8_t*>(vcBaseReg + DATA_REG_OFFSET);
//
// //byteReg[0] = data[idx];
// //byteReg[1] = data[idx];
// } else {
// abortPacketTransfer();
// return returnvalue::FAILED;
// }
// // TODO: Change this after the bugfix. Right now, the PAPB ignores the content of the byte
// // width configuration.5
// // It's okay to increment by a larger amount for the last segment here, loop will be over
// // in any case.
// idx += 4;
// }
for (size_t idx = 0; idx < size; idx++) {
// This delay is super-important, DO NOT REMOVE!
// Polling the GPIO or the config register too often messes up the scheduler.
// TODO: Maybe this should not be done like this. It would be better if there was a custom
// FPGA module which can accept packets and then takes care of dumping that packet into
// the PTME. DMA would be an ideal solution for this.
nanosleep(&BETWEEN_POLL_DELAY, &remDelay);
if (pollInterfaceReadiness(2, false) == returnvalue::OK) {
*(vcBaseReg + DATA_REG_OFFSET) = static_cast<uint32_t>(data[idx]);
} else {
abortPacketTransfer();
return returnvalue::FAILED;
}
}
nanosleep(&BETWEEN_POLL_DELAY, &remDelay);
if (pollInterfaceReadiness(2, false) == returnvalue::OK) {
completePacketTransfer();
} else {
if (not pollReadyForOctet(MAX_BUSY_POLLS)) {
abortPacketTransfer();
return returnvalue::FAILED;
}
for (size_t idx = 0; idx < size; idx++) {
if (not pollReadyForOctet(MAX_BUSY_POLLS)) {
abortPacketTransfer();
return returnvalue::FAILED;
}
*(vcBaseReg + DATA_REG_OFFSET) = static_cast<uint32_t>(data[idx]);
}
if (not pollReadyForOctet(MAX_BUSY_POLLS)) {
abortPacketTransfer();
return returnvalue::FAILED;
}
completePacketTransfer();
return returnvalue::OK;
}
@ -98,63 +58,49 @@ void PapbVcInterface::startPacketTransfer(ByteWidthCfg initWidth) {
void PapbVcInterface::completePacketTransfer() { *vcBaseReg = CONFIG_END; }
ReturnValue_t PapbVcInterface::pollInterfaceReadiness(uint32_t maxPollRetries,
bool checkReadyState) const {
uint32_t busyIdx = 0;
nextDelay.tv_nsec = FIRST_DELAY_PAPB_POLLING_NS;
while (true) {
// Check if PAPB interface is ready to receive data. Use the configuration register for this.
// Bit 5, see PTME ptme_001_01-0-7-r2 Table 31.
uint32_t reg = *vcBaseReg;
bool busy = (reg >> 5) & 0b1;
bool ready = (reg >> 6) & 0b1;
if (not busy) {
return returnvalue::OK;
}
if (checkReadyState and not ready) {
return PAPB_BUSY;
}
busyIdx++;
if (busyIdx >= maxPollRetries) {
return PAPB_BUSY;
}
// Ignore signal handling here for now.
nanosleep(&nextDelay, &remDelay);
// Adaptive delay.
if (nextDelay.tv_nsec * 2 <= MAX_DELAY_PAPB_POLLING_NS) {
nextDelay.tv_nsec *= 2;
}
}
return returnvalue::OK;
bool PapbVcInterface::pollReadyForPacket() const {
// Check if PAPB interface is ready to receive data. Use the configuration register for this.
// Bit 5, see PTME ptme_001_01-0-7-r2 Table 31.
uint32_t reg = *vcBaseReg;
return (reg >> 6) & 0b1;
}
void PapbVcInterface::isVcInterfaceBufferEmpty() {
bool PapbVcInterface::isVcInterfaceBufferEmpty() {
ReturnValue_t result = returnvalue::OK;
gpio::Levels papbEmptyState = gpio::Levels::HIGH;
result = gpioComIF->readGpio(papbEmptyId, papbEmptyState);
if (result != returnvalue::OK) {
sif::warning << "PapbVcInterface::isVcInterfaceBufferEmpty: Failed to read papb empty signal"
<< std::endl;
return;
sif::error << "PapbVcInterface::isVcInterfaceBufferEmpty: Failed to read papb empty signal"
<< std::endl;
return true;
}
if (papbEmptyState == gpio::Levels::HIGH) {
sif::debug << "PapbVcInterface::isVcInterfaceBufferEmpty: Buffer is empty" << std::endl;
} else {
sif::debug << "PapbVcInterface::isVcInterfaceBufferEmpty: Buffer is not empty" << std::endl;
return true;
}
return;
return false;
}
bool PapbVcInterface::isBusy() const { return pollInterfaceReadiness(0, true) == PAPB_BUSY; }
bool PapbVcInterface::isBusy() const { return not pollReadyForPacket(); }
void PapbVcInterface::cancelTransfer() { abortPacketTransfer(); }
inline bool PapbVcInterface::pollReadyForOctet(uint32_t maxCycles) const {
uint32_t reg;
uint32_t idx = 0;
while (idx < maxCycles) {
reg = *vcBaseReg;
// Busy bit.
if (not((reg >> 5) & 0b1)) {
return true;
}
idx++;
}
return false;
}
ReturnValue_t PapbVcInterface::sendTestFrame() {
/** Size of one complete transfer frame data field amounts to 1105 bytes */
uint8_t testPacket[1105];

View File

@ -30,8 +30,7 @@ class PapbVcInterface : public VirtualChannelIF {
* @param uioFile UIO file providing access to the PAPB bus
* @param mapNum Map number of UIO map associated with this virtual channel
*/
PapbVcInterface(LinuxLibgpioIF* gpioComIF, gpioId_t papbBusyId, gpioId_t papbEmptyId,
std::string uioFile, int mapNum);
PapbVcInterface(LinuxLibgpioIF* gpioComIF, gpioId_t papbEmptyId, std::string uioFile, int mapNum);
virtual ~PapbVcInterface();
bool isBusy() const override;
@ -81,11 +80,9 @@ class PapbVcInterface : public VirtualChannelIF {
static constexpr long int FIRST_DELAY_PAPB_POLLING_NS = 10;
static constexpr long int MAX_DELAY_PAPB_POLLING_NS = 40;
static constexpr uint32_t MAX_BUSY_POLLS = 1000;
LinuxLibgpioIF* gpioComIF = nullptr;
/** Pulled to low when virtual channel not ready to receive data */
gpioId_t papbBusyId = gpio::NO_GPIO;
/** High when external buffer memory of virtual channel is empty */
gpioId_t papbEmptyId = gpio::NO_GPIO;
@ -120,13 +117,15 @@ class PapbVcInterface : public VirtualChannelIF {
*
* @return returnvalue::OK when ready to receive data else PAPB_BUSY.
*/
inline ReturnValue_t pollInterfaceReadiness(uint32_t maxPollRetries, bool checkReadyState) const;
inline bool pollReadyForPacket() const;
inline bool pollReadyForOctet(uint32_t maxCycles) const;
/**
* @brief This function can be used for debugging to check whether there are packets in
* the packet buffer of the virtual channel or not.
*/
void isVcInterfaceBufferEmpty();
bool isVcInterfaceBufferEmpty();
/**
* @brief This function sends a complete telemetry transfer frame data field (1105 bytes)

View File

@ -22,11 +22,11 @@ ReturnValue_t PdecConfig::write() {
if (result != returnvalue::OK) {
return result;
}
result = writeFrameHeaderFirstOctet();
result = writeFrameHeaderFirstWord();
if (result != returnvalue::OK) {
return result;
}
result = writeFrameHeaderSecondOctet();
result = writeFrameHeaderSecondWord();
if (result != returnvalue::OK) {
return result;
}
@ -77,7 +77,7 @@ ReturnValue_t PdecConfig::setPositiveWindow(uint8_t pw) {
return result;
}
// Rewrite second config word which contains the positive window parameter
writeFrameHeaderSecondOctet();
writeFrameHeaderSecondWord();
return returnvalue::OK;
}
@ -92,7 +92,7 @@ ReturnValue_t PdecConfig::setNegativeWindow(uint8_t nw) {
return result;
}
// Rewrite second config word which contains the negative window parameter
writeFrameHeaderSecondOctet();
writeFrameHeaderSecondWord();
return returnvalue::OK;
}
@ -114,43 +114,23 @@ ReturnValue_t PdecConfig::getNegativeWindow(uint8_t& negativeWindow) {
return returnvalue::OK;
}
ReturnValue_t PdecConfig::writeFrameHeaderFirstOctet() {
ReturnValue_t PdecConfig::writeFrameHeaderFirstWord() {
uint32_t word = 0;
word |= (VERSION_ID << 30);
// Setting the bypass flag and the control command flag should not have any
// implication on the operation of the PDEC IP Core
word |= (BYPASS_FLAG << 29);
word |= (CONTROL_COMMAND_FLAG << 28);
word |= (RESERVED_FIELD_A << 26);
word |= (SPACECRAFT_ID << 16);
word |= (VIRTUAL_CHANNEL << 10);
word |= (DUMMY_BITS << 8);
uint8_t positiveWindow = 0;
ReturnValue_t result =
localParameterHandler.getValue(pdecconfigdefs::paramkeys::POSITIVE_WINDOW, positiveWindow);
ReturnValue_t result = createFirstWord(&word);
if (result != returnvalue::OK) {
return result;
}
word |= static_cast<uint32_t>(positiveWindow);
*(memoryBaseAddress + FRAME_HEADER_OFFSET) = word;
*(memoryBaseAddress + FRAME_HEADER_OFFSET + OFFSET_FIRST_CONFIG_WORD) = word;
return returnvalue::OK;
}
ReturnValue_t PdecConfig::writeFrameHeaderSecondOctet() {
uint8_t negativeWindow = 0;
ReturnValue_t result =
localParameterHandler.getValue(pdecconfigdefs::paramkeys::NEGATIVE_WINDOW, negativeWindow);
ReturnValue_t PdecConfig::writeFrameHeaderSecondWord() {
uint32_t word = 0;
ReturnValue_t result = createSecondWord(&word);
if (result != returnvalue::OK) {
return result;
}
uint32_t word = 0;
word = 0;
word |= (static_cast<uint32_t>(negativeWindow) << 24);
word |= (HIGH_AU_MAP_ID << 16);
word |= (ENABLE_DERANDOMIZER << 8);
*(memoryBaseAddress + FRAME_HEADER_OFFSET + 1) = word;
*(memoryBaseAddress + FRAME_HEADER_OFFSET + OFFSET_SECOND_CONFIG_WORD) = word;
return returnvalue::OK;
}
@ -189,3 +169,49 @@ uint8_t PdecConfig::getOddParity(uint8_t number) {
parityBit = ~(countBits & 0x1) & 0x1;
return parityBit;
}
ReturnValue_t PdecConfig::createFirstWord(uint32_t* word) {
*word = 0;
*word |= (VERSION_ID << 30);
// Setting the bypass flag and the control command flag should not have any
// implication on the operation of the PDEC IP Core
*word |= (BYPASS_FLAG << 29);
*word |= (CONTROL_COMMAND_FLAG << 28);
*word |= (RESERVED_FIELD_A << 26);
*word |= (SPACECRAFT_ID << 16);
*word |= (VIRTUAL_CHANNEL << 10);
*word |= (DUMMY_BITS << 8);
uint8_t positiveWindow = 0;
ReturnValue_t result =
localParameterHandler.getValue(pdecconfigdefs::paramkeys::POSITIVE_WINDOW, positiveWindow);
if (result != returnvalue::OK) {
return result;
}
*word |= static_cast<uint32_t>(positiveWindow);
return returnvalue::OK;
}
ReturnValue_t PdecConfig::createSecondWord(uint32_t* word) {
uint8_t negativeWindow = 0;
ReturnValue_t result =
localParameterHandler.getValue(pdecconfigdefs::paramkeys::NEGATIVE_WINDOW, negativeWindow);
if (result != returnvalue::OK) {
return result;
}
*word = 0;
*word = 0;
*word |= (static_cast<uint32_t>(negativeWindow) << 24);
*word |= (HIGH_AU_MAP_ID << 16);
*word |= (ENABLE_DERANDOMIZER << 8);
return returnvalue::OK;
}
uint32_t PdecConfig::readbackFirstWord() {
return *(memoryBaseAddress + FRAME_HEADER_OFFSET + OFFSET_FIRST_CONFIG_WORD);
}
uint32_t PdecConfig::readbackSecondWord() {
return *(memoryBaseAddress + FRAME_HEADER_OFFSET + OFFSET_SECOND_CONFIG_WORD);
}

View File

@ -48,6 +48,39 @@ class PdecConfig {
ReturnValue_t getPositiveWindow(uint8_t& positiveWindow);
ReturnValue_t getNegativeWindow(uint8_t& negativeWindow);
/**
* @brief Creates the first word of the PDEC configuration
*
* @param word The created word will be written to this pointer
*
* @return OK if successful, otherwise error return value
*
*/
ReturnValue_t createFirstWord(uint32_t* word);
/**
* @brief Creates the second word of the PDEC configuration
*
* @param word The created word will be written to this pointer
*
* @return OK if successful, otherwise error return value
*/
ReturnValue_t createSecondWord(uint32_t* word);
/**
* @brief Reads first config word from the config memory
*
* @return The config word
*/
uint32_t readbackFirstWord();
/**
* @brief Reads the second config word from the config memory
*
* @return The config word
*/
uint32_t readbackSecondWord();
private:
// TC transfer frame configuration parameters
static const uint8_t VERSION_ID = 0;
@ -66,6 +99,8 @@ class PdecConfig {
// 0x200 / 4 = 0x80
static const uint32_t FRAME_HEADER_OFFSET = 0x80;
static const uint32_t OFFSET_FIRST_CONFIG_WORD = 0;
static const uint32_t OFFSET_SECOND_CONFIG_WORD = 1;
static const uint32_t MAP_ADDR_LUT_OFFSET = 0xA0;
static const uint32_t MAP_CLK_FREQ_OFFSET = 0x90;
@ -102,8 +137,8 @@ class PdecConfig {
*/
ReturnValue_t createPersistentConfig();
ReturnValue_t writeFrameHeaderFirstOctet();
ReturnValue_t writeFrameHeaderSecondOctet();
ReturnValue_t writeFrameHeaderFirstWord();
ReturnValue_t writeFrameHeaderSecondWord();
void writeMapConfig();
/**

View File

@ -478,6 +478,7 @@ bool PdecHandler::checkFrameAna(uint32_t pdecFar) {
}
case (FrameAna_t::FRAME_DIRTY): {
triggerEvent(INVALID_TC_FRAME, FRAME_DIRTY_RETVAL);
checkConfig();
sif::warning << "PdecHandler::checkFrameAna: Frame dirty" << std::endl;
break;
}
@ -577,6 +578,30 @@ void PdecHandler::handleIReason(uint32_t pdecFar, ReturnValue_t parameter1) {
}
}
void PdecHandler::checkConfig() {
uint32_t firstWord = 0;
ReturnValue_t result = pdecConfig.createFirstWord(&firstWord);
if (result != returnvalue::OK) {
// This should normally never happen during runtime. So here is just
// output a warning
sif::warning << "PdecHandler::checkConfig: Failed to create first word" << std::endl;
return;
}
uint32_t secondWord = 0;
result = pdecConfig.createSecondWord(&secondWord);
if (result != returnvalue::OK) {
// This should normally never happen during runtime. So here is just
// output a warning
sif::warning << "PdecHandler::checkConfig: Failed to create second word" << std::endl;
return;
}
uint32_t readbackFirstWord = pdecConfig.readbackFirstWord();
uint32_t readbackSecondWord = pdecConfig.readbackSecondWord();
if (firstWord != readbackFirstWord or secondWord != readbackSecondWord) {
triggerEvent(PDEC_CONFIG_CORRUPTED, readbackFirstWord, readbackSecondWord);
}
}
void PdecHandler::handleNewTc() {
ReturnValue_t result = returnvalue::OK;

View File

@ -282,6 +282,11 @@ class PdecHandler : public SystemObject,
*/
void handleIReason(uint32_t pdecFar, ReturnValue_t parameter1);
/**
* @brief Checks if PDEC configuration is still correct
*/
void checkConfig();
/**
* @brief Handles the reception of new TCs. Reads the pointer to the storage location of the
* new TC segment, extracts the PUS packet and forwards the data to the object

View File

@ -26,6 +26,11 @@ ReturnValue_t PtmeConfig::setRate(uint32_t bitRate) {
return axiPtmeConfig->writeCaduRateReg(static_cast<uint8_t>(rateVal));
}
uint32_t PtmeConfig::getRate() {
uint8_t rateReg = axiPtmeConfig->readCaduRateReg();
return (BIT_CLK_FREQ / (rateReg + 1));
}
void PtmeConfig::invertTxClock(bool invert) {
if (invert) {
axiPtmeConfig->enableTxclockInversion();

View File

@ -32,6 +32,7 @@ class PtmeConfig : public SystemObject {
* of the CADU clock due to the convolutional code added by the s-Band transceiver.
*/
ReturnValue_t setRate(uint32_t bitRate);
uint32_t getRate();
/**
* @brief Will change the time the tx data signal is updated with respect to the tx clock

View File

@ -71,6 +71,10 @@ static constexpr Event OPEN_IRQ_FILE_FAILED = event::makeEvent(SUBSYSTEM_ID, 13,
//! [EXPORT] : [COMMENT] PDEC initialization failed. This might also be due to the persistent
//! confiuration never becoming available, for example due to SD card issues.
static constexpr Event PDEC_INIT_FAILED = event::makeEvent(SUBSYSTEM_ID, 14, severity::HIGH);
//! [EXPORT] : [COMMENT] The PDEC configuration area has been corrupted
//! P1: The first configuration word
//! P2: The second configuration word
static constexpr Event PDEC_CONFIG_CORRUPTED = event::makeEvent(SUBSYSTEM_ID, 15, severity::HIGH);
// Action IDs
static constexpr ActionId_t PRINT_CLCW = 0;

View File

@ -155,12 +155,15 @@ void PlocSupervisorHandler::doStartUp() {
startupState = StartupState::ON;
}
if (startupState == StartupState::ON) {
hkset.setReportingEnabled(true);
setMode(_MODE_TO_ON);
}
}
void PlocSupervisorHandler::doShutDown() {
setMode(_MODE_POWER_DOWN);
hkset.setReportingEnabled(false);
hkset.setValidity(false, true);
shutdownCmdSent = false;
packetInBuffer = false;
nextReplyId = supv::NONE;
@ -170,6 +173,10 @@ void PlocSupervisorHandler::doShutDown() {
}
ReturnValue_t PlocSupervisorHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) {
if (not commandIsExecuting(GET_HK_REPORT)) {
*id = GET_HK_REPORT;
return buildCommandFromCommand(*id, nullptr, 0);
}
return NOTHING_TO_SEND;
}
@ -430,7 +437,7 @@ void PlocSupervisorHandler::fillCommandAndReplyMap() {
insertInReplyMap(MEMORY_CHECK, 5, nullptr, 0, false);
// TM replies
insertInReplyMap(HK_REPORT, 3, &hkset, SIZE_HK_REPORT);
insertInReplyMap(HK_REPORT, 3, &hkset);
insertInReplyMap(BOOT_STATUS_REPORT, 3, &bootStatusReport, SIZE_BOOT_STATUS_REPORT);
insertInReplyMap(LATCHUP_REPORT, 3, &latchupStatusReport, SIZE_LATCHUP_STATUS_REPORT);
insertInReplyMap(LOGGING_REPORT, 3, &loggingReport, SIZE_LOGGING_REPORT);
@ -790,6 +797,8 @@ ReturnValue_t PlocSupervisorHandler::initializeLocalDataPool(localpool::DataPool
localDataPoolMap.emplace(supv::ADC_ENG_14, new PoolEntry<uint16_t>({0}));
localDataPoolMap.emplace(supv::ADC_ENG_15, new PoolEntry<uint16_t>({0}));
poolManager.subscribeForRegularPeriodicPacket(
subdp::RegularHkPeriodicParams(hkset.getSid(), false, 10.0));
return returnvalue::OK;
}
@ -918,7 +927,7 @@ ReturnValue_t PlocSupervisorHandler::handleExecutionReport(const uint8_t* data)
ReturnValue_t PlocSupervisorHandler::handleHkReport(const uint8_t* data) {
ReturnValue_t result = returnvalue::OK;
result = verifyPacket(data, supv::SIZE_HK_REPORT);
result = verifyPacket(data, tmReader.getFullPacketLen());
if (result == result::CRC_FAILURE) {
sif::error << "PlocSupervisorHandler::handleHkReport: Hk report has invalid crc" << std::endl;
@ -2096,9 +2105,9 @@ uint32_t PlocSupervisorHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t mod
// if (result != returnvalue::OK) {
// return result;
// }
//#if OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_PLOC_SUPERVISOR == 1
// #if OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_PLOC_SUPERVISOR == 1
// loggingReport.printSet();
//#endif
// #endif
// nextReplyId = supv::EXE_REPORT;
// return result;
// }

View File

@ -274,12 +274,12 @@ ReturnValue_t PlocSupvUartManager::initiateUpdateContinuation() {
}
// ReturnValue_t PlocSupvHelper::startEventBufferRequest(std::string path) {
//#ifdef XIPHOS_Q7S
// #ifdef XIPHOS_Q7S
// ReturnValue_t result = FilesystemHelper::checkPath(path);
// if (result != returnvalue::OK) {
// return result;
// }
//#endif
// #endif
// if (not std::filesystem::exists(path)) {
// return PATH_NOT_EXISTS;
// }
@ -836,11 +836,11 @@ uint32_t PlocSupvUartManager::getFileSize(std::string filename) {
ReturnValue_t PlocSupvUartManager::handleEventBufferReception(ploc::SpTmReader& reader) {
ReturnValue_t result = returnvalue::OK;
// TODO: Fix
//#ifdef XIPHOS_Q7S
// #ifdef XIPHOS_Q7S
// if (not sdcMan->getActiveSdCard()) {
// return HasFileSystemIF::FILESYSTEM_INACTIVE;
// }
//#endif
// #endif
// std::string filename = Filenaming::generateAbsoluteFilename(
// eventBufferReq.path, eventBufferReq.filename, timestamping);
// std::ofstream file(filename, std::ios_base::app | std::ios_base::out);

View File

@ -139,7 +139,6 @@ enum ReplyId : DeviceCommandId_t {
// Size of complete space packet (6 byte header + size of data + 2 byte CRC)
static const uint16_t SIZE_ACK_REPORT = 14;
static const uint16_t SIZE_EXE_REPORT = 14;
static const uint16_t SIZE_HK_REPORT = 52;
static const uint16_t SIZE_BOOT_STATUS_REPORT = 24;
static const uint16_t SIZE_LATCHUP_STATUS_REPORT = 31;
static const uint16_t SIZE_LOGGING_REPORT = 73;

View File

@ -20,6 +20,9 @@ void SusHandler::doStartUp() {
}
if (internalState == InternalState::STARTUP) {
if (commandExecuted) {
if (waitingForRecovery) {
waitingForRecovery = false;
}
setMode(MODE_ON);
internalState = InternalState::NONE;
commandExecuted = false;
@ -83,15 +86,36 @@ ReturnValue_t SusHandler::scanForReply(const uint8_t *start, size_t len, DeviceC
}
ReturnValue_t SusHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
const auto *reply = reinterpret_cast<const acs::SusReply *>(packet);
if (reply->dataWasSet) {
if (internalState == InternalState::STARTUP) {
commandExecuted = true;
}
PoolReadGuard pg(&dataset);
dataset.setValidity(true, true);
dataset.tempC = max1227::getTemperature(reply->tempRaw);
std::memcpy(dataset.channels.value, reply->channelsRaw, sizeof(reply->channelsRaw));
if (!reply->dataWasSet) {
return returnvalue::OK;
}
if (internalState == InternalState::STARTUP) {
commandExecuted = true;
}
PoolReadGuard pg(&dataset);
// Simple FDIR variant to make the handler more robust to invalid messages which
// appear sometimes for the SUS device: Allow invalid message up to a certain threshold
// before triggering FDIR reactions.
if (reply->tempRaw == 0xfff and not waitingForRecovery) {
if (invalidMsgCounter == 0) {
triggerEvent(TEMPERATURE_ALL_ONES_START);
} else if (invalidMsgCounter == susMax1227::MAX_INVALID_MSG_COUNT) {
triggerEvent(DeviceHandlerIF::DEVICE_WANTS_HARD_REBOOT);
waitingForRecovery = true;
}
invalidMsgCounter++;
dataset.setValidity(false, true);
dataset.tempC = thermal::INVALID_TEMPERATURE;
std::memset(dataset.channels.value, 0, sizeof(dataset.channels.value));
return returnvalue::OK;
}
if (invalidMsgCounter > 0) {
triggerEvent(TEMPERATURE_ALL_ONES_RECOVERY, invalidMsgCounter);
invalidMsgCounter = 0;
}
dataset.setValidity(true, true);
dataset.tempC = max1227::getTemperature(reply->tempRaw);
std::memcpy(dataset.channels.value, reply->channelsRaw, sizeof(reply->channelsRaw));
return returnvalue::OK;
}

View File

@ -15,7 +15,15 @@ class SusHandler : public DeviceHandlerBase {
static constexpr DeviceCommandId_t REPLY = 0x77;
static const uint8_t INTERFACE_ID = CLASS_ID::SUS_HANDLER;
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::SUS_BOARD_ASS;
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::SUS_HANDLER;
//! [EXPORT] : [COMMENT] Detected invalid values, starting invalid message counting
static constexpr Event TEMPERATURE_ALL_ONES_START =
event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM);
//! [EXPORT] : [COMMENT] Detected valid values again, resetting invalid message counter.
//! P1: Invalid message counter.
static constexpr Event TEMPERATURE_ALL_ONES_RECOVERY =
event::makeEvent(SUBSYSTEM_ID, 1, severity::INFO);
SusHandler(uint32_t objectId, uint8_t susIdx, object_id_t deviceCommunication,
CookieIF *comCookie);
@ -46,6 +54,8 @@ class SusHandler : public DeviceHandlerBase {
susMax1227::SusDataset dataset;
acs::SusRequest request{};
uint8_t susIdx;
bool waitingForRecovery = true;
uint32_t invalidMsgCounter = 0;
uint32_t transitionDelay = 1000;
bool goToNormalMode = false;

View File

@ -20,32 +20,47 @@ static constexpr Event CANT_GET_FIX = event::makeEvent(SUBSYSTEM_ID, 1, severity
static constexpr DeviceCommandId_t GPS_REPLY = 0;
static constexpr DeviceCommandId_t TRIGGER_RESET_PIN_GNSS = 5;
static constexpr uint32_t DATASET_ID = 0;
enum SetIds : uint32_t {
CORE_DATASET,
SKYVIEW_DATASET,
};
enum GpsPoolIds : lp_id_t {
LATITUDE = 0,
LONGITUDE = 1,
ALTITUDE = 2,
SPEED = 3,
FIX_MODE = 4,
SATS_IN_USE = 5,
SATS_IN_VIEW = 6,
UNIX_SECONDS = 7,
YEAR = 8,
MONTH = 9,
DAY = 10,
HOURS = 11,
MINUTES = 12,
SECONDS = 13
LATITUDE,
LONGITUDE,
ALTITUDE,
SPEED,
FIX_MODE,
SATS_IN_USE,
SATS_IN_VIEW,
UNIX_SECONDS,
YEAR,
MONTH,
DAY,
HOURS,
MINUTES,
SECONDS,
SKYVIEW_UNIX_SECONDS,
PRN_ID,
AZIMUTH,
ELEVATION,
SIGNAL2NOISE,
USED,
};
static constexpr uint8_t CORE_DATASET_ENTRIES = 14;
static constexpr uint8_t SKYVIEW_ENTRIES = 6;
static constexpr uint8_t MAX_SATELLITES = 30;
enum GpsFixModes : uint8_t { INVALID = 0, NO_FIX = 1, FIX_2D = 2, FIX_3D = 3 };
} // namespace GpsHyperion
class GpsPrimaryDataset : public StaticLocalDataSet<18> {
class GpsPrimaryDataset : public StaticLocalDataSet<GpsHyperion::CORE_DATASET_ENTRIES> {
public:
GpsPrimaryDataset(object_id_t gpsId) : StaticLocalDataSet(sid_t(gpsId, GpsHyperion::DATASET_ID)) {
GpsPrimaryDataset(object_id_t gpsId)
: StaticLocalDataSet(sid_t(gpsId, GpsHyperion::CORE_DATASET)) {
setAllVariablesReadOnly();
}
@ -69,7 +84,34 @@ class GpsPrimaryDataset : public StaticLocalDataSet<18> {
friend class GpsHyperionLinuxController;
friend class GpsCtrlDummy;
GpsPrimaryDataset(HasLocalDataPoolIF* hkOwner)
: StaticLocalDataSet(hkOwner, GpsHyperion::DATASET_ID) {}
: StaticLocalDataSet(hkOwner, GpsHyperion::CORE_DATASET) {}
};
class SkyviewDataset : public StaticLocalDataSet<GpsHyperion::SKYVIEW_ENTRIES> {
public:
SkyviewDataset(object_id_t gpsId)
: StaticLocalDataSet(sid_t(gpsId, GpsHyperion::SKYVIEW_DATASET)) {
setAllVariablesReadOnly();
}
lp_var_t<double> unixSeconds =
lp_var_t<double>(sid.objectId, GpsHyperion::SKYVIEW_UNIX_SECONDS, this);
lp_vec_t<int16_t, GpsHyperion::MAX_SATELLITES> prn_id =
lp_vec_t<int16_t, GpsHyperion::MAX_SATELLITES>(sid.objectId, GpsHyperion::PRN_ID, this);
lp_vec_t<int16_t, GpsHyperion::MAX_SATELLITES> azimuth =
lp_vec_t<int16_t, GpsHyperion::MAX_SATELLITES>(sid.objectId, GpsHyperion::AZIMUTH, this);
lp_vec_t<int16_t, GpsHyperion::MAX_SATELLITES> elevation =
lp_vec_t<int16_t, GpsHyperion::MAX_SATELLITES>(sid.objectId, GpsHyperion::ELEVATION, this);
lp_vec_t<double, GpsHyperion::MAX_SATELLITES> signal2noise =
lp_vec_t<double, GpsHyperion::MAX_SATELLITES>(sid.objectId, GpsHyperion::SIGNAL2NOISE, this);
lp_vec_t<uint8_t, GpsHyperion::MAX_SATELLITES> used =
lp_vec_t<uint8_t, GpsHyperion::MAX_SATELLITES>(sid.objectId, GpsHyperion::USED, this);
private:
friend class GpsHyperionLinuxController;
friend class GpsCtrlDummy;
SkyviewDataset(HasLocalDataPoolIF* hkOwner)
: StaticLocalDataSet(hkOwner, GpsHyperion::SKYVIEW_DATASET) {}
};
#endif /* MISSION_ACS_ARCHIVE_GPSDEFINITIONS_H_ */

View File

@ -26,14 +26,29 @@ enum SafeModeStrategy : uint8_t {
SAFECTRL_OFF = 0,
SAFECTRL_NO_MAG_FIELD_FOR_CONTROL = 1,
SAFECTRL_NO_SENSORS_FOR_CONTROL = 2,
SAFECTRL_ACTIVE_MEKF = 10,
SAFECTRL_WITHOUT_MEKF = 11,
SAFECTRL_ECLIPSE_DAMPING = 12,
SAFECTRL_ECLIPSE_IDELING = 13,
// OBSW version <= v6.1.0
LEGACY_SAFECTRL_ACTIVE_MEKF = 10,
LEGACY_SAFECTRL_WITHOUT_MEKF = 11,
LEGACY_SAFECTRL_ECLIPSE_DAMPING = 12,
LEGACY_SAFECTRL_ECLIPSE_IDELING = 13,
// Added in v6.2.0
SAFECTRL_MEKF = 14,
SAFECTRL_GYR = 15,
SAFECTRL_SUSMGM = 16,
SAFECTRL_ECLIPSE_DAMPING_GYR = 17,
SAFECTRL_ECLIPSE_DAMPING_SUSMGM = 18,
SAFECTRL_ECLIPSE_IDELING = 19,
SAFECTRL_DETUMBLE_FULL = 20,
SAFECTRL_DETUMBLE_DETERIORATED = 21,
};
enum GpsSource : uint8_t {
NONE,
GPS,
GPS_EXTRAPOLATED,
SPG4,
};
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::ACS_SUBSYSTEM;
//! [EXPORT] : [COMMENT] The limits for the rotation in safe mode were violated.
static constexpr Event SAFE_RATE_VIOLATION = MAKE_EVENT(0, severity::MEDIUM);
@ -56,6 +71,8 @@ static constexpr Event MEKF_INVALID_MODE_VIOLATION = MAKE_EVENT(6, severity::HIG
//! failed.
//! P1: Missing information about magnetic field, P2: Missing information about rotational rate
static constexpr Event SAFE_MODE_CONTROLLER_FAILURE = MAKE_EVENT(7, severity::HIGH);
//! [EXPORT] : [COMMENT] The TLE for the SGP4 Propagator has become too old.
static constexpr Event TLE_TOO_OLD = MAKE_EVENT(8, severity::INFO);
extern const char* getModeStr(AcsMode mode);

View File

@ -1,3 +1,4 @@
#include <fsfw/globalfunctions/arrayprinter.h>
#include <fsfw/ipc/QueueFactory.h>
#include <fsfw/timemanager/Stopwatch.h>
#include <mission/acs/str/StarTrackerHandler.h>
@ -88,7 +89,6 @@ void StarTrackerHandler::doStartUp() {
default:
return;
}
solutionSet.setReportingEnabled(true);
startupState = StartupState::DONE;
internalState = InternalState::IDLE;
setMode(_MODE_TO_ON);
@ -325,7 +325,7 @@ ReturnValue_t StarTrackerHandler::buildNormalDeviceCommand(DeviceCommandId_t* id
ReturnValue_t StarTrackerHandler::buildTransitionDeviceCommand(DeviceCommandId_t* id) {
switch (internalState) {
case InternalState::BOOT_FIRMWARE: {
if (bootState == FwBootState::WAIT_FOR_EXECUTION or bootState == FwBootState::VERIFY_BOOT) {
if (bootState == FwBootState::VERIFY_BOOT or isAwaitingReply()) {
return NOTHING_TO_SEND;
}
if (bootState == FwBootState::NONE) {
@ -349,74 +349,69 @@ ReturnValue_t StarTrackerHandler::buildTransitionDeviceCommand(DeviceCommandId_t
*id = startracker::REQ_VERSION;
return buildCommandFromCommand(*id, nullptr, 0);
}
case (FwBootState::SET_TIME): {
*id = startracker::SET_TIME_FROM_SYS_TIME;
return buildCommandFromCommand(*id, nullptr, 0);
}
case (FwBootState::LOGLEVEL): {
bootState = FwBootState::WAIT_FOR_EXECUTION;
*id = startracker::LOGLEVEL;
return buildCommandFromCommand(
*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()), paramJsonFile.size());
}
case (FwBootState::LIMITS): {
bootState = FwBootState::WAIT_FOR_EXECUTION;
*id = startracker::LIMITS;
return buildCommandFromCommand(
*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()), paramJsonFile.size());
}
case (FwBootState::TRACKING): {
bootState = FwBootState::WAIT_FOR_EXECUTION;
*id = startracker::TRACKING;
return buildCommandFromCommand(
*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()), paramJsonFile.size());
}
case FwBootState::MOUNTING:
bootState = FwBootState::WAIT_FOR_EXECUTION;
*id = startracker::MOUNTING;
return buildCommandFromCommand(
*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()), paramJsonFile.size());
case FwBootState::IMAGE_PROCESSOR:
bootState = FwBootState::WAIT_FOR_EXECUTION;
*id = startracker::IMAGE_PROCESSOR;
return buildCommandFromCommand(
*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()), paramJsonFile.size());
case FwBootState::CAMERA:
bootState = FwBootState::WAIT_FOR_EXECUTION;
*id = startracker::CAMERA;
return buildCommandFromCommand(
*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()), paramJsonFile.size());
case FwBootState::CENTROIDING:
bootState = FwBootState::WAIT_FOR_EXECUTION;
*id = startracker::CENTROIDING;
return buildCommandFromCommand(
*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()), paramJsonFile.size());
case FwBootState::LISA:
bootState = FwBootState::WAIT_FOR_EXECUTION;
*id = startracker::LISA;
return buildCommandFromCommand(
*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()), paramJsonFile.size());
case FwBootState::MATCHING:
bootState = FwBootState::WAIT_FOR_EXECUTION;
*id = startracker::MATCHING;
return buildCommandFromCommand(
*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()), paramJsonFile.size());
case FwBootState::VALIDATION:
bootState = FwBootState::WAIT_FOR_EXECUTION;
*id = startracker::VALIDATION;
return buildCommandFromCommand(
*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()), paramJsonFile.size());
case FwBootState::ALGO:
bootState = FwBootState::WAIT_FOR_EXECUTION;
*id = startracker::ALGO;
return buildCommandFromCommand(
*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()), paramJsonFile.size());
case FwBootState::LOG_SUBSCRIPTION:
bootState = FwBootState::WAIT_FOR_EXECUTION;
*id = startracker::LOGSUBSCRIPTION;
return buildCommandFromCommand(
*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()), paramJsonFile.size());
case FwBootState::DEBUG_CAMERA:
bootState = FwBootState::WAIT_FOR_EXECUTION;
*id = startracker::DEBUG_CAMERA;
return buildCommandFromCommand(
*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()), paramJsonFile.size());
case FwBootState::AUTO_THRESHOLD:
*id = startracker::AUTO_THRESHOLD;
return buildCommandFromCommand(
*id, reinterpret_cast<const uint8_t*>(paramJsonFile.c_str()), paramJsonFile.size());
default: {
sif::error << "STR: Unexpected boot state" << (int)bootState << std::endl;
return NOTHING_TO_SEND;
@ -459,6 +454,20 @@ ReturnValue_t StarTrackerHandler::buildCommandFromCommand(DeviceCommandId_t devi
preparePingRequest();
return returnvalue::OK;
}
case (startracker::SET_TIME_FROM_SYS_TIME): {
SetTimeActionRequest setTimeRequest{};
timeval tv;
Clock::getClock(&tv);
setTimeRequest.unixTime =
(static_cast<uint64_t>(tv.tv_sec) * 1000 * 1000) + (static_cast<uint64_t>(tv.tv_usec));
arc_pack_settime_action_req(&setTimeRequest, commandBuffer, &rawPacketLen);
size_t serLen = 0;
// Time in milliseconds. Manual serialization because arcsec API ignores endianness.
SerializeAdapter::serialize(&setTimeRequest.unixTime, commandBuffer + 2, &serLen,
sizeof(commandBuffer) - 2, SerializeIF::Endianness::LITTLE);
rawPacket = commandBuffer;
return returnvalue::OK;
}
case (startracker::REQ_TIME): {
prepareTimeRequest();
return returnvalue::OK;
@ -551,6 +560,11 @@ ReturnValue_t StarTrackerHandler::buildCommandFromCommand(DeviceCommandId_t devi
result = prepareParamCommand(commandData, commandDataLen, jcfgs.logLevel, reinitNextSetParam);
return result;
}
case (startracker::AUTO_THRESHOLD): {
result =
prepareParamCommand(commandData, commandDataLen, jcfgs.autoThreshold, reinitNextSetParam);
return result;
}
case (startracker::LOGSUBSCRIPTION): {
result = prepareParamCommand(commandData, commandDataLen, jcfgs.logSubscription,
reinitNextSetParam);
@ -655,19 +669,23 @@ void StarTrackerHandler::fillCommandAndReplyMap() {
startracker::MAX_FRAME_SIZE * 2 + 2);
this->insertInCommandAndReplyMap(startracker::LOGLEVEL, 3, nullptr,
startracker::MAX_FRAME_SIZE * 2 + 2);
this->insertInCommandAndReplyMap(startracker::SET_TIME_FROM_SYS_TIME, 2, nullptr,
startracker::MAX_FRAME_SIZE * 2 + 2);
this->insertInCommandAndReplyMap(startracker::LOGSUBSCRIPTION, 3, nullptr,
startracker::MAX_FRAME_SIZE * 2 + 2);
this->insertInCommandAndReplyMap(startracker::DEBUG_CAMERA, 3, nullptr,
startracker::MAX_FRAME_SIZE * 2 + 2);
this->insertInCommandAndReplyMap(startracker::LIMITS, 3, nullptr,
startracker::MAX_FRAME_SIZE * 2 + 2);
this->insertInCommandAndReplyMap(startracker::AUTO_THRESHOLD, 2, nullptr,
startracker::MAX_FRAME_SIZE * 2 + 2);
this->insertInCommandAndReplyMap(startracker::MOUNTING, 3, nullptr,
startracker::MAX_FRAME_SIZE * 2 + 2);
this->insertInCommandAndReplyMap(startracker::IMAGE_PROCESSOR, 3, nullptr,
startracker::MAX_FRAME_SIZE * 2 + 2);
this->insertInCommandAndReplyMap(startracker::CAMERA, 3, nullptr,
startracker::MAX_FRAME_SIZE * 2 + 2);
this->insertInCommandAndReplyMap(startracker::CENTROIDING, 3, nullptr,
this->insertInCommandAndReplyMap(startracker::CENTROIDING, 2, nullptr,
startracker::MAX_FRAME_SIZE * 2 + 2);
this->insertInCommandAndReplyMap(startracker::LISA, 3, nullptr,
startracker::MAX_FRAME_SIZE * 2 + 2);
@ -814,6 +832,7 @@ void StarTrackerHandler::bootFirmware(Mode_t toMode) {
setMode(toMode, startracker::SUBMODE_FIRMWARE);
}
sif::info << "STR: Firmware boot success" << std::endl;
solutionSet.setReportingEnabled(true);
internalState = InternalState::IDLE;
startupState = StartupState::IDLE;
break;
@ -837,6 +856,7 @@ void StarTrackerHandler::setUpJsonCfgs(JsonConfigs& cfgs, const char* paramJsonF
cfgs.mounting.init(paramJsonFile);
cfgs.limits.init(paramJsonFile);
cfgs.subscription.init(paramJsonFile);
cfgs.autoThreshold.init(paramJsonFile);
JCFG_DONE = true;
}
@ -860,13 +880,20 @@ ReturnValue_t StarTrackerHandler::scanForReply(const uint8_t* start, size_t rema
*foundLen = remainingSize;
return returnvalue::OK;
}
if (remainingSize < 3) {
sif::error << "StarTrackerHandler: Reply packet with length less than 3 is invalid"
if (remainingSize < 2) {
sif::error << "StarTrackerHandler: Reply packet with length " << remainingSize
<< " less than "
"2 is invalid"
<< std::endl;
return returnvalue::FAILED;
}
switch (startracker::getReplyFrameType(start)) {
case TMTC_COMM_ERROR: {
*foundLen = remainingSize;
triggerEvent(COM_ERROR_REPLY_RECEIVED, start[1]);
break;
}
case TMTC_ACTIONREPLY: {
*foundLen = remainingSize;
return scanForActionReply(startracker::getId(start), foundId);
@ -901,6 +928,10 @@ ReturnValue_t StarTrackerHandler::interpretDeviceReply(DeviceCommandId_t id,
ReturnValue_t result = returnvalue::OK;
switch (id) {
case (startracker::SET_TIME_FROM_SYS_TIME): {
result = handleActionReply(packet);
break;
}
case (startracker::REQ_TIME): {
result = handleTm(packet, timeSet, startracker::TimeSet::SIZE, "REQ_TIME");
break;
@ -960,7 +991,8 @@ ReturnValue_t StarTrackerHandler::interpretDeviceReply(DeviceCommandId_t id,
case (startracker::TRACKING):
case (startracker::VALIDATION):
case (startracker::IMAGE_PROCESSOR):
case (startracker::ALGO): {
case (startracker::ALGO):
case (startracker::AUTO_THRESHOLD): {
result = handleSetParamReply(packet);
break;
}
@ -1367,6 +1399,10 @@ ReturnValue_t StarTrackerHandler::scanForActionReply(uint8_t replyId, DeviceComm
*foundId = startracker::UPLOAD_IMAGE;
break;
}
case (ARC_ACTION_REQ_SETTIME_ID): {
*foundId = startracker::SET_TIME_FROM_SYS_TIME;
break;
}
case (startracker::ID::CHECKSUM): {
*foundId = startracker::CHECKSUM;
break;
@ -1434,6 +1470,10 @@ ReturnValue_t StarTrackerHandler::scanForSetParameterReply(uint8_t replyId,
*foundId = startracker::DEBUG_CAMERA;
break;
}
case (startracker::ID::AUTO_THRESHOLD): {
*foundId = startracker::AUTO_THRESHOLD;
break;
}
case (startracker::ID::LOG_SUBSCRIPTION): {
*foundId = startracker::LOGSUBSCRIPTION;
break;
@ -1861,7 +1901,7 @@ ReturnValue_t StarTrackerHandler::handleSetParamReply(const uint8_t* rawFrame) {
uint8_t status = startracker::getStatusField(rawFrame);
if (status != startracker::STATUS_OK) {
sif::warning << "StarTrackerHandler::handleSetParamReply: Failed to execute parameter set "
" command with parameter ID"
"command with parameter ID "
<< static_cast<unsigned int>(*(rawFrame + PARAMETER_ID_OFFSET)) << std::endl;
if (internalState != InternalState::IDLE) {
internalState = InternalState::IDLE;
@ -1869,21 +1909,25 @@ ReturnValue_t StarTrackerHandler::handleSetParamReply(const uint8_t* rawFrame) {
return SET_PARAM_FAILED;
}
if (internalState != InternalState::IDLE) {
handleStartup(*(rawFrame + PARAMETER_ID_OFFSET));
handleStartup(*rawFrame, *(rawFrame + PARAMETER_ID_OFFSET));
}
return returnvalue::OK;
}
ReturnValue_t StarTrackerHandler::handleActionReply(const uint8_t* rawFrame) {
uint8_t status = startracker::getStatusField(rawFrame);
ReturnValue_t result = returnvalue::OK;
if (status != startracker::STATUS_OK) {
sif::warning << "StarTrackerHandler::handleActionReply: Failed to execute action "
<< "command with action ID "
<< static_cast<unsigned int>(*(rawFrame + ACTION_ID_OFFSET)) << " and status "
<< static_cast<unsigned int>(status) << std::endl;
return ACTION_FAILED;
result = ACTION_FAILED;
}
return returnvalue::OK;
if (internalState != InternalState::IDLE) {
handleStartup(*rawFrame, *(rawFrame + PARAMETER_ID_OFFSET));
}
return result;
}
ReturnValue_t StarTrackerHandler::handleChecksumReply(const uint8_t* rawFrame) {
@ -1979,7 +2023,7 @@ ReturnValue_t StarTrackerHandler::checkProgram() {
startupState = StartupState::BOOT_BOOTLOADER;
}
if (bootState == FwBootState::VERIFY_BOOT) {
bootState = FwBootState::LOGLEVEL;
bootState = FwBootState::SET_TIME;
} else if (internalState == InternalState::BOOTLOADER_CHECK) {
triggerEvent(BOOTING_BOOTLOADER_FAILED_EVENT);
internalState = InternalState::FAILED_BOOTLOADER_BOOT;
@ -2056,7 +2100,18 @@ ReturnValue_t StarTrackerHandler::handleActionReplySet(const uint8_t* rawFrame,
return result;
}
void StarTrackerHandler::handleStartup(uint8_t parameterId) {
void StarTrackerHandler::handleStartup(uint8_t tmType, uint8_t parameterId) {
switch (tmType) {
case (TMTC_ACTIONREPLY): {
case (ARC_ACTION_REQ_SETTIME_ID): {
bootState = FwBootState::LOGLEVEL;
return;
}
default: {
break;
}
}
}
switch (parameterId) {
case (startracker::ID::LOG_LEVEL): {
bootState = FwBootState::LIMITS;
@ -2066,7 +2121,7 @@ void StarTrackerHandler::handleStartup(uint8_t parameterId) {
bootState = FwBootState::TRACKING;
break;
}
case (startracker::ID::TRACKING): {
case (ARC_PARAM_TRACKING_ID): {
bootState = FwBootState::MOUNTING;
break;
}
@ -2107,6 +2162,10 @@ void StarTrackerHandler::handleStartup(uint8_t parameterId) {
break;
}
case (startracker::ID::DEBUG_CAMERA): {
bootState = FwBootState::AUTO_THRESHOLD;
break;
}
case (startracker::ID::AUTO_THRESHOLD): {
bootState = FwBootState::NONE;
internalState = InternalState::DONE;
break;

View File

@ -6,6 +6,7 @@
#include <mission/acs/str/ArcsecJsonParamBase.h>
#include <mission/acs/str/strHelpers.h>
#include <mission/acs/str/strJsonCommands.h>
#include <thirdparty/sagittactl/wire/common/genericstructs.h>
#include <thread>
@ -16,7 +17,7 @@
#include "fsfw/timemanager/Countdown.h"
extern "C" {
#include <wire/common/SLIP.h>
#include <wire/common/genericstructs.h>
}
/**
@ -143,6 +144,8 @@ class StarTrackerHandler : public DeviceHandlerBase {
static const Event BOOTING_FIRMWARE_FAILED_EVENT = MAKE_EVENT(1, severity::LOW);
//! [EXPORT] : [COMMENT] Failed to boot star tracker into bootloader mode
static const Event BOOTING_BOOTLOADER_FAILED_EVENT = MAKE_EVENT(2, severity::LOW);
//! [EXPORT] : [COMMENT] Received COM error. P1: Communication Error ID (datasheet p32)
static constexpr Event COM_ERROR_REPLY_RECEIVED = MAKE_EVENT(3, severity::LOW);
static const uint8_t STATUS_OFFSET = 2;
static const uint8_t PARAMS_OFFSET = 2;
@ -226,6 +229,7 @@ class StarTrackerHandler : public DeviceHandlerBase {
Mounting mounting;
Limits limits;
Subscription subscription;
AutoThreshold autoThreshold;
};
JsonConfigs jcfgs;
Countdown jcfgCountdown = Countdown(250);
@ -264,6 +268,7 @@ class StarTrackerHandler : public DeviceHandlerBase {
BOOT_DELAY,
REQ_VERSION,
VERIFY_BOOT,
SET_TIME,
LOGLEVEL,
LIMITS,
TRACKING,
@ -278,7 +283,9 @@ class StarTrackerHandler : public DeviceHandlerBase {
ALGO,
LOG_SUBSCRIPTION,
DEBUG_CAMERA,
AUTO_THRESHOLD,
WAIT_FOR_EXECUTION,
RETRY_CFG_CMD
};
FwBootState bootState = FwBootState::NONE;
@ -468,7 +475,7 @@ class StarTrackerHandler : public DeviceHandlerBase {
/**
* @brief Handles the startup state machine
*/
void handleStartup(uint8_t parameterId);
void handleStartup(uint8_t tmType, uint8_t parameterId);
/**
* @brief Handles telemtry replies and fills the appropriate dataset

View File

@ -176,6 +176,13 @@ static const char DEBUG_CAMERA[] = "DebugCamera";
static const char TIMING[] = "timing";
static const char TEST[] = "test";
static constexpr char AUTO_THRESHOLD[] = "AutoThreshold";
static constexpr char AT_MODE[] = "mode";
static constexpr char AT_DESIRED_BLOB_COUNTS[] = "desiredBlobsCount";
static constexpr char AT_MIN_THRESHOLD[] = "minThreshold";
static constexpr char AT_MAX_THRESHOLD[] = "maxThreshold";
static constexpr char AT_THRESHOLD_KP[] = "thresholdKp";
} // namespace arcseckeys
#endif /* BSP_Q7S_DEVICES_DEVICEDEFINITIONS_ARCSECJSONKEYS_H_ */

View File

@ -326,6 +326,8 @@ static const DeviceCommandId_t DEBUG_CAMERA = 83;
static const DeviceCommandId_t FIRMWARE_UPDATE = 84;
static const DeviceCommandId_t DISABLE_TIMESTAMP_GENERATION = 85;
static const DeviceCommandId_t ENABLE_TIMESTAMP_GENERATION = 86;
static constexpr DeviceCommandId_t SET_TIME_FROM_SYS_TIME = 87;
static constexpr DeviceCommandId_t AUTO_THRESHOLD = 88;
static const DeviceCommandId_t NONE = 0xFFFFFFFF;
static const uint32_t VERSION_SET_ID = REQ_VERSION;
@ -396,7 +398,6 @@ static const uint8_t ALGO = 16;
static const uint8_t REBOOT = 7;
static const uint8_t UPLOAD_IMAGE = 10;
static const uint8_t POWER = 11;
static const uint8_t SET_TIME = 14;
static const uint8_t SUBSCRIPTION = 18;
static const uint8_t SOLUTION = 24;
static const uint8_t TEMPERATURE = 27;
@ -410,6 +411,7 @@ static const uint8_t TAKE_IMAGE = 15;
static const uint8_t LOG_LEVEL = 3;
static const uint8_t LOG_SUBSCRIPTION = 19;
static const uint8_t DEBUG_CAMERA = 20;
static const uint8_t AUTO_THRESHOLD = 23;
} // namespace ID
namespace Program {
@ -441,6 +443,21 @@ static const uint32_t secret[16]{
REGION_12_SECRET, REGION_13_SECRET, REGION_14_SECRET, REGION_15_SECRET};
} // namespace region_secrets
namespace comError {
enum Id {
BAD_CRC = 1,
UNKNOWN_TM_ID = 2,
UNKNOWN_PARAM_ID = 3,
UNKNOWN_ACTION_REQ = 4,
INVALID_TM_SIZE = 5,
INVALID_PARAM_SIZE = 6,
INVALID_ACTION_REQ_SIZE = 7,
FRAME_TOO_SHORT = 8,
INVALID_FRAME_TYPE = 9,
UNKNOWN_ERROR = 10
};
}
enum class FlashSections : uint8_t {
BOOTLOADER_SECTION = 0,
MAIN_FIRMWARE_SECTION = 1,
@ -650,7 +667,7 @@ class SolutionSet : public StaticLocalDataSet<SOLUTION_SET_ENTRIES> {
// Ticks timestamp
lp_var_t<uint32_t> ticks = lp_var_t<uint32_t>(sid.objectId, PoolIds::TICKS_SOLUTION_SET, this);
/// Unix time stamp
lp_var_t<uint64_t> time = lp_var_t<uint64_t>(sid.objectId, PoolIds::TIME_SOLUTION_SET, this);
lp_var_t<uint64_t> timeUs = lp_var_t<uint64_t>(sid.objectId, PoolIds::TIME_SOLUTION_SET, this);
// Calibrated quaternion (takes into account the mounting quaternion), typically same as
// track q values
lp_var_t<float> caliQw = lp_var_t<float>(sid.objectId, PoolIds::CALI_QW, this);
@ -695,7 +712,7 @@ class SolutionSet : public StaticLocalDataSet<SOLUTION_SET_ENTRIES> {
void printSet() {
PoolReadGuard rg(this);
sif::info << "SolutionSet::printSet: Ticks: " << this->ticks << std::endl;
sif::info << "SolutionSet::printSet: Time: " << this->time << std::endl;
sif::info << "SolutionSet::printSet: Time: " << this->timeUs << std::endl;
sif::info << "SolutionSet::printSet: Calibrated quaternion Qw: " << this->caliQw << std::endl;
sif::info << "SolutionSet::printSet: Calibrated quaternion Qx: " << this->caliQx << std::endl;
sif::info << "SolutionSet::printSet: Calibrated quaternion Qy: " << this->caliQy << std::endl;

View File

@ -916,3 +916,45 @@ ReturnValue_t DebugCamera::createCommand(uint8_t* buffer) {
adduint32(param, buffer + offset);
return returnvalue::OK;
}
AutoThreshold::AutoThreshold() : ArcsecJsonParamBase(arcseckeys::AUTO_THRESHOLD) {}
size_t AutoThreshold::getSize() { return COMMAND_SIZE; }
ReturnValue_t AutoThreshold::createCommand(uint8_t* buffer) {
ReturnValue_t result = returnvalue::OK;
uint8_t offset = 0;
std::string param;
addSetParamHeader(buffer, startracker::ID::AUTO_THRESHOLD);
offset = 2;
result = getParam(arcseckeys::AT_MODE, param);
if (result != returnvalue::OK) {
return result;
}
adduint8(param, buffer + offset);
offset += 1;
result = getParam(arcseckeys::AT_DESIRED_BLOB_COUNTS, param);
if (result != returnvalue::OK) {
return result;
}
adduint8(param, buffer + offset);
offset += 1;
result = getParam(arcseckeys::AT_MIN_THRESHOLD, param);
if (result != returnvalue::OK) {
return result;
}
adduint16(param, buffer + offset);
offset += 2;
result = getParam(arcseckeys::AT_MAX_THRESHOLD, param);
if (result != returnvalue::OK) {
return result;
}
adduint16(param, buffer + offset);
offset += 2;
result = getParam(arcseckeys::AT_THRESHOLD_KP, param);
if (result != returnvalue::OK) {
return result;
}
addfloat(param, buffer + offset);
return returnvalue::OK;
}

View File

@ -222,6 +222,22 @@ class LogSubscription : public ArcsecJsonParamBase {
ReturnValue_t createCommand(uint8_t* buffer) override;
};
/**
* @brief Generates command to set log subscription parameters.
*
*/
class AutoThreshold : public ArcsecJsonParamBase {
public:
AutoThreshold();
size_t getSize();
private:
static const size_t COMMAND_SIZE = 12;
ReturnValue_t createCommand(uint8_t* buffer) override;
};
/**
* @brief Generates command to set debug camera parameters
*

View File

@ -8,6 +8,14 @@
namespace susMax1227 {
// This is 16 seconds for a polling frequency of 0.4 seconds.
static constexpr uint32_t MAX_INVALID_MSG_COUNT = 40;
// Using a decrement time of 32 seconds should cause faulty device incrementation to best faster
// the decrementation, so that FDIR reactions will eventuall be triggered.
// NOTE: Not used currently, we perform the strange reply check logic in the handler and trigger
// a reboot directly using the appropriate event.
static constexpr uint32_t FAULTY_COM_DECREMENT_TIME_MS = 32000;
static const DeviceCommandId_t NONE = 0x0; // Set when no command is pending
static const DeviceCommandId_t WRITE_SETUP = 1;

View File

@ -246,7 +246,13 @@ ReturnValue_t CcsdsIpCoreHandler::checkModeCommand(Mode_t mode, Submode_t submod
void CcsdsIpCoreHandler::startTransition(Mode_t mode, Submode_t submode) {
triggerEvent(CHANGING_MODE, mode, submode);
if (mode == HasModesIF::MODE_ON) {
if (this->submode != submode) {
uint32_t currentRate = ptmeConfig.getRate();
// Check whether the rate actually changes.
if ((this->submode != submode) and
(((submode == static_cast<Submode_t>(com::CcsdsSubmode::DATARATE_LOW) and
(currentRate != RATE_100KBPS))) or
((submode == static_cast<Submode_t>(com::CcsdsSubmode::DATARATE_HIGH) and
(currentRate != RATE_500KBPS))))) {
initPtmeUpdateAfterXCycles();
updateContext.enableTransmitAfterPtmeUpdate = true;
updateContext.updateClockRate = true;

View File

@ -19,13 +19,8 @@ LiveTmTask::LiveTmTask(object_id_t objectId, PusTmFunnel& pusFunnel, CfdpTmFunne
ReturnValue_t LiveTmTask::performOperation(uint8_t opCode) {
readCommandQueue();
while (true) {
bool performWriteOp = true;
if (mode == MODE_OFF or ptmeLocked) {
performWriteOp = false;
}
// The funnel tasks are scheduled here directly as well.
ReturnValue_t result = channel.handleNextTm(performWriteOp);
ReturnValue_t result = channel.handleNextTm(!ptmeLocked);
if (result == DirectTmSinkIF::IS_BUSY) {
sif::error << "Lost live TM, PAPB busy" << std::endl;
}

View File

@ -42,13 +42,7 @@ ReturnValue_t PersistentLogTmStoreTask::performOperation(uint8_t opCode) {
if (not someonesBusy) {
TaskFactory::delayTask(100);
} else if (vcBusyDuringDump) {
// TODO: Might not be necessary
sif::debug << "VC busy, delaying" << std::endl;
TaskFactory::delayTask(10);
} else {
// TODO: Would be best to remove this, but not delaying here can lead to evil issues.
// Polling the PAPB of the PTME core too often leads to scheuduling issues.
TaskFactory::delayTask(2);
}
}
}

View File

@ -24,13 +24,7 @@ ReturnValue_t PersistentSingleTmStoreTask::performOperation(uint8_t opCode) {
if (not busy) {
TaskFactory::delayTask(100);
} else if (dumpContext.vcBusyDuringDump) {
sif::debug << "VC busy, delaying" << std::endl;
// TODO: Might not be necessary
TaskFactory::delayTask(10);
} else {
// TODO: Would be best to remove this, but not delaying here can lead to evil issues.
// Polling the PAPB of the PTME core too often leads to scheuduling issues.
TaskFactory::delayTask(2);
}
}
}

View File

@ -773,11 +773,13 @@ void SyrlinksHandler::doTransition(Mode_t modeFrom, Submode_t subModeFrom) {
auto txStandbyHandler = [&]() {
txDataset.setReportingEnabled(false);
poolManager.changeCollectionInterval(temperatureSet.getSid(), 60.0);
poolManager.changeCollectionInterval(rxDataset.getSid(), 60.0);
transState = TransitionState::SET_TX_STANDBY;
internalState = InternalState::TX_TRANSITION;
};
auto txOnHandler = [&](TransitionState tgtTransitionState) {
txDataset.setReportingEnabled(true);
poolManager.changeCollectionInterval(rxDataset.getSid(), 5.0);
poolManager.changeCollectionInterval(txDataset.getSid(), 10.0);
poolManager.changeCollectionInterval(temperatureSet.getSid(), 5.0);
transState = tgtTransitionState;

View File

@ -45,13 +45,19 @@ bool TmStoreTaskBase::handleOneStore(PersistentTmStoreWithTmQueue& store,
} else {
Command_t execCmd;
// Handle TC requests, for example deletion or retrieval requests.
// TODO: Not really clean here.. would be better if the executed command is returns as an
// enumeration.
result = store.handleCommandQueue(ipcStore, execCmd);
if (result == returnvalue::OK) {
if (execCmd == TmStoreMessage::DOWNLINK_STORE_CONTENT_TIME) {
if (execCmd == TmStoreMessage::DOWNLINK_STORE_CONTENT_TIME) {
if (result == PersistentTmStore::DUMP_DONE) {
dumpDoneHandler(store, dumpContext);
} else if (result == returnvalue::OK) {
cancelDumpCd.resetTimer();
tmSinkBusyCd.resetTimer();
dumpContext.reset();
}
}
if (execCmd != CommandMessageIF::CMD_NONE) {
tcRequestReceived = true;
}
}
@ -119,21 +125,13 @@ ReturnValue_t TmStoreTaskBase::performDump(PersistentTmStoreWithTmQueue& store,
DumpContext& dumpContext, bool& dumpPerformed) {
size_t dumpedLen = 0;
auto dumpDoneHandler = [&]() {
uint32_t startTime;
uint32_t endTime;
store.getStartAndEndTimeCurrentOrLastDump(startTime, endTime);
triggerEvent(dumpContext.eventIfDone, dumpContext.numberOfDumpedPackets,
dumpContext.dumpedBytes);
dumpContext.reset();
};
// Dump the next packet into the PTME.
dumpContext.ptmeBusyCounter = 0;
tmSinkBusyCd.resetTimer();
ReturnValue_t result = store.getNextDumpPacket(tmReader, fileHasSwapped);
if (fileHasSwapped and result == PersistentTmStore::DUMP_DONE) {
// This can happen if a file is corrupted and the next file swap completes the dump.
dumpDoneHandler();
dumpDoneHandler(store, dumpContext);
return returnvalue::OK;
} else if (result != returnvalue::OK) {
sif::error << "PersistentTmStore: Getting next dump packet failed" << std::endl;
@ -157,7 +155,7 @@ ReturnValue_t TmStoreTaskBase::performDump(PersistentTmStoreWithTmQueue& store,
}
}
if (result == PersistentTmStore::DUMP_DONE) {
dumpDoneHandler();
dumpDoneHandler(store, dumpContext);
}
return returnvalue::OK;
}
@ -198,6 +196,14 @@ ReturnValue_t TmStoreTaskBase::connectModeTreeParent(HasModeTreeChildrenIF& pare
return modetree::connectModeTreeParent(parent, *this, nullptr, modeHelper);
}
void TmStoreTaskBase::dumpDoneHandler(PersistentTmStore& store, DumpContext& dumpContext) {
uint32_t startTime;
uint32_t endTime;
store.getStartAndEndTimeCurrentOrLastDump(startTime, endTime);
triggerEvent(dumpContext.eventIfDone, dumpContext.numberOfDumpedPackets, dumpContext.dumpedBytes);
dumpContext.reset();
}
ModeTreeChildIF& TmStoreTaskBase::getModeTreeChildIF() { return *this; }
void TmStoreTaskBase::readCommandQueue(void) {

View File

@ -96,6 +96,8 @@ class TmStoreTaskBase : public SystemObject,
ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode,
uint32_t* msToReachTheMode) override;
void dumpDoneHandler(PersistentTmStore& store, DumpContext& dumpContext);
void announceMode(bool recursive) override;
object_id_t getObjectId() const override;
const HasHealthIF* getOptHealthIF() const override;

View File

@ -7,6 +7,7 @@
AcsController::AcsController(object_id_t objectId, bool enableHkSets)
: ExtendedControllerBase(objectId),
enableHkSets(enableHkSets),
fusedRotationEstimation(&acsParameters),
guidance(&acsParameters),
safeCtrl(&acsParameters),
ptgCtrl(&acsParameters),
@ -20,7 +21,9 @@ AcsController::AcsController(object_id_t objectId, bool enableHkSets)
gpsDataProcessed(this),
mekfData(this),
ctrlValData(this),
actuatorCmdData(this) {}
actuatorCmdData(this),
fusedRotRateData(this),
tleData(this) {}
ReturnValue_t AcsController::initialize() {
ReturnValue_t result = parameterHelper.initialize();
@ -60,6 +63,26 @@ ReturnValue_t AcsController::executeAction(ActionId_t actionId, MessageQueueId_t
mekfLost = false;
return HasActionsIF::EXECUTION_FINISHED;
}
case UPDATE_TLE: {
if (size != 69 * 2) {
return INVALID_PARAMETERS;
}
ReturnValue_t result = navigation.updateTle(data, data + 69);
if (result != returnvalue::OK) {
PoolReadGuard pg(&tleData);
navigation.updateTle(tleData.line1.value, tleData.line2.value);
return result;
}
{
PoolReadGuard pg(&tleData);
if (pg.getReadResult() == returnvalue::OK) {
std::memcpy(tleData.line1.value, data, 69);
std::memcpy(tleData.line2.value, data + 69, 69);
tleData.setValidity(true, true);
}
}
return HasActionsIF::EXECUTION_FINISHED;
}
default: {
return HasActionsIF::INVALID_ACTION_ID;
}
@ -144,10 +167,19 @@ void AcsController::performSafe() {
timeval now;
Clock::getClock_timeval(&now);
ReturnValue_t result = navigation.useSpg4(now, &gpsDataProcessed);
if (result == Sgp4Propagator::TLE_TOO_OLD and not tleTooOldFlag) {
triggerEvent(acs::TLE_TOO_OLD);
tleTooOldFlag = true;
} else if (result != Sgp4Propagator::TLE_TOO_OLD) {
tleTooOldFlag = false;
}
sensorProcessing.process(now, &sensorValues, &mgmDataProcessed, &susDataProcessed,
&gyrDataProcessed, &gpsDataProcessed, &acsParameters);
ReturnValue_t result = navigation.useMekf(&sensorValues, &gyrDataProcessed, &mgmDataProcessed,
&susDataProcessed, &mekfData, &acsParameters);
fusedRotationEstimation.estimateFusedRotationRateSafe(&susDataProcessed, &mgmDataProcessed,
&gyrDataProcessed, &fusedRotRateData);
result = navigation.useMekf(&sensorValues, &gyrDataProcessed, &mgmDataProcessed,
&susDataProcessed, &mekfData, &acsParameters);
if (result != MultiplicativeKalmanFilter::MEKF_RUNNING &&
result != MultiplicativeKalmanFilter::MEKF_INITIALIZED) {
if (not mekfInvalidFlag) {
@ -172,25 +204,42 @@ void AcsController::performSafe() {
acs::SafeModeStrategy safeCtrlStrat = safeCtrl.safeCtrlStrategy(
mgmDataProcessed.mgmVecTot.isValid(), not mekfInvalidFlag,
gyrDataProcessed.gyrVecTot.isValid(), susDataProcessed.susVecTot.isValid(),
acsParameters.safeModeControllerParameters.useMekf,
fusedRotRateData.rotRateTotal.isValid(), acsParameters.safeModeControllerParameters.useMekf,
acsParameters.safeModeControllerParameters.useGyr,
acsParameters.safeModeControllerParameters.dampingDuringEclipse);
switch (safeCtrlStrat) {
case (acs::SafeModeStrategy::SAFECTRL_ACTIVE_MEKF):
case (acs::SafeModeStrategy::SAFECTRL_MEKF):
safeCtrl.safeMekf(mgmDataProcessed.mgmVecTot.value, mekfData.satRotRateMekf.value,
susDataProcessed.sunIjkModel.value, mekfData.quatMekf.value, sunTargetDir,
magMomMtq, errAng);
safeCtrlFailureFlag = false;
safeCtrlFailureCounter = 0;
break;
case (acs::SafeModeStrategy::SAFECTRL_WITHOUT_MEKF):
safeCtrl.safeNonMekf(mgmDataProcessed.mgmVecTot.value, gyrDataProcessed.gyrVecTot.value,
susDataProcessed.susVecTot.value, sunTargetDir, magMomMtq, errAng);
case (acs::SafeModeStrategy::SAFECTRL_GYR):
safeCtrl.safeGyr(mgmDataProcessed.mgmVecTot.value, gyrDataProcessed.gyrVecTot.value,
susDataProcessed.susVecTot.value, sunTargetDir, magMomMtq, errAng);
safeCtrlFailureFlag = false;
safeCtrlFailureCounter = 0;
break;
case (acs::SafeModeStrategy::SAFECTRL_ECLIPSE_DAMPING):
safeCtrl.safeRateDamping(mgmDataProcessed.mgmVecTot.value, gyrDataProcessed.gyrVecTot.value,
sunTargetDir, magMomMtq, errAng);
case (acs::SafeModeStrategy::SAFECTRL_SUSMGM):
safeCtrl.safeSusMgm(mgmDataProcessed.mgmVecTot.value, fusedRotRateData.rotRateTotal.value,
fusedRotRateData.rotRateParallel.value,
fusedRotRateData.rotRateOrthogonal.value,
susDataProcessed.susVecTot.value, sunTargetDir, magMomMtq, errAng);
safeCtrlFailureFlag = false;
safeCtrlFailureCounter = 0;
break;
case (acs::SafeModeStrategy::SAFECTRL_ECLIPSE_DAMPING_GYR):
safeCtrl.safeRateDampingGyr(mgmDataProcessed.mgmVecTot.value,
gyrDataProcessed.gyrVecTot.value, sunTargetDir, magMomMtq,
errAng);
safeCtrlFailureFlag = false;
safeCtrlFailureCounter = 0;
break;
case (acs::SafeModeStrategy::SAFECTRL_ECLIPSE_DAMPING_SUSMGM):
safeCtrl.safeRateDampingSusMgm(mgmDataProcessed.mgmVecTot.value,
fusedRotRateData.rotRateTotal.value, sunTargetDir, magMomMtq,
errAng);
safeCtrlFailureFlag = false;
safeCtrlFailureCounter = 0;
break;
@ -214,12 +263,20 @@ void AcsController::performSafe() {
acsParameters.magnetorquerParameter.dipoleMax, magMomMtq, cmdDipoleMtqs);
// detumble check and switch
if (mekfData.satRotRateMekf.isValid() && acsParameters.safeModeControllerParameters.useMekf &&
VectorOperations<double>::norm(mekfData.satRotRateMekf.value, 3) >
acsParameters.detumbleParameter.omegaDetumbleStart) {
detumbleCounter++;
} else if (gyrDataProcessed.gyrVecTot.isValid() &&
VectorOperations<double>::norm(gyrDataProcessed.gyrVecTot.value, 3) >
if (acsParameters.safeModeControllerParameters.useMekf) {
if (mekfData.satRotRateMekf.isValid() and
VectorOperations<double>::norm(mekfData.satRotRateMekf.value, 3) >
acsParameters.detumbleParameter.omegaDetumbleStart) {
detumbleCounter++;
}
} else if (acsParameters.safeModeControllerParameters.useGyr) {
if (gyrDataProcessed.gyrVecTot.isValid() and
VectorOperations<double>::norm(gyrDataProcessed.gyrVecTot.value, 3) >
acsParameters.detumbleParameter.omegaDetumbleStart) {
detumbleCounter++;
}
} else if (fusedRotRateData.rotRateTotal.isValid() and
VectorOperations<double>::norm(fusedRotRateData.rotRateTotal.value, 3) >
acsParameters.detumbleParameter.omegaDetumbleStart) {
detumbleCounter++;
} else if (detumbleCounter > 0) {
@ -242,10 +299,19 @@ void AcsController::performDetumble() {
timeval now;
Clock::getClock_timeval(&now);
ReturnValue_t result = navigation.useSpg4(now, &gpsDataProcessed);
if (result == Sgp4Propagator::TLE_TOO_OLD and not tleTooOldFlag) {
triggerEvent(acs::TLE_TOO_OLD);
tleTooOldFlag = true;
} else {
tleTooOldFlag = false;
}
sensorProcessing.process(now, &sensorValues, &mgmDataProcessed, &susDataProcessed,
&gyrDataProcessed, &gpsDataProcessed, &acsParameters);
ReturnValue_t result = navigation.useMekf(&sensorValues, &gyrDataProcessed, &mgmDataProcessed,
&susDataProcessed, &mekfData, &acsParameters);
fusedRotationEstimation.estimateFusedRotationRateSafe(&susDataProcessed, &mgmDataProcessed,
&gyrDataProcessed, &fusedRotRateData);
result = navigation.useMekf(&sensorValues, &gyrDataProcessed, &mgmDataProcessed,
&susDataProcessed, &mekfData, &acsParameters);
if (result != MultiplicativeKalmanFilter::MEKF_RUNNING &&
result != MultiplicativeKalmanFilter::MEKF_INITIALIZED) {
if (not mekfInvalidFlag) {
@ -289,17 +355,26 @@ void AcsController::performDetumble() {
actuatorCmd.cmdDipoleMtq(*acsParameters.magnetorquerParameter.inverseAlignment,
acsParameters.magnetorquerParameter.dipoleMax, magMomMtq, cmdDipoleMtqs);
if (mekfData.satRotRateMekf.isValid() &&
VectorOperations<double>::norm(mekfData.satRotRateMekf.value, 3) <
acsParameters.detumbleParameter.omegaDetumbleEnd) {
detumbleCounter++;
} else if (gyrDataProcessed.gyrVecTot.isValid() &&
VectorOperations<double>::norm(gyrDataProcessed.gyrVecTot.value, 3) <
if (acsParameters.safeModeControllerParameters.useMekf) {
if (mekfData.satRotRateMekf.isValid() and
VectorOperations<double>::norm(mekfData.satRotRateMekf.value, 3) <
acsParameters.detumbleParameter.omegaDetumbleEnd) {
detumbleCounter++;
}
} else if (acsParameters.safeModeControllerParameters.useGyr) {
if (gyrDataProcessed.gyrVecTot.isValid() and
VectorOperations<double>::norm(gyrDataProcessed.gyrVecTot.value, 3) <
acsParameters.detumbleParameter.omegaDetumbleEnd) {
detumbleCounter++;
}
} else if (fusedRotRateData.rotRateTotal.isValid() and
VectorOperations<double>::norm(fusedRotRateData.rotRateTotal.value, 3) <
acsParameters.detumbleParameter.omegaDetumbleEnd) {
detumbleCounter++;
} else if (detumbleCounter > 0) {
detumbleCounter -= 1;
}
if (detumbleCounter > acsParameters.detumbleParameter.detumblecounter) {
detumbleCounter = 0;
// Triggers safe mode transition in subsystem
@ -307,7 +382,7 @@ void AcsController::performDetumble() {
startTransition(mode, acs::SafeSubmode::DEFAULT);
}
disableCtrlValData();
updateCtrlValData(safeCtrlStrat);
updateActuatorCmdData(cmdDipoleMtqs);
commandActuators(cmdDipoleMtqs[0], cmdDipoleMtqs[1], cmdDipoleMtqs[2],
acsParameters.magnetorquerParameter.torqueDuration);
@ -317,10 +392,17 @@ void AcsController::performPointingCtrl() {
timeval now;
Clock::getClock_timeval(&now);
ReturnValue_t result = navigation.useSpg4(now, &gpsDataProcessed);
if (result == Sgp4Propagator::TLE_TOO_OLD and not tleTooOldFlag) {
triggerEvent(acs::TLE_TOO_OLD);
tleTooOldFlag = true;
} else {
tleTooOldFlag = false;
}
sensorProcessing.process(now, &sensorValues, &mgmDataProcessed, &susDataProcessed,
&gyrDataProcessed, &gpsDataProcessed, &acsParameters);
ReturnValue_t result = navigation.useMekf(&sensorValues, &gyrDataProcessed, &mgmDataProcessed,
&susDataProcessed, &mekfData, &acsParameters);
result = navigation.useMekf(&sensorValues, &gyrDataProcessed, &mgmDataProcessed,
&susDataProcessed, &mekfData, &acsParameters);
if (result != MultiplicativeKalmanFilter::MEKF_RUNNING &&
result != MultiplicativeKalmanFilter::MEKF_INITIALIZED) {
mekfInvalidCounter++;
@ -578,6 +660,23 @@ void AcsController::updateActuatorCmdData(const double *rwTargetTorque,
}
}
void AcsController::updateCtrlValData(uint8_t safeModeStrat) {
PoolReadGuard pg(&ctrlValData);
if (pg.getReadResult() == returnvalue::OK) {
std::memcpy(ctrlValData.tgtQuat.value, ZERO_VEC4, 4 * sizeof(double));
ctrlValData.tgtQuat.setValid(false);
std::memcpy(ctrlValData.errQuat.value, ZERO_VEC4, 4 * sizeof(double));
ctrlValData.errQuat.setValid(false);
ctrlValData.errAng.value = 0;
ctrlValData.errAng.setValid(false);
std::memcpy(ctrlValData.tgtRotRate.value, ZERO_VEC3, 3 * sizeof(double));
ctrlValData.tgtRotRate.setValid(false);
ctrlValData.safeStrat.value = safeModeStrat;
ctrlValData.safeStrat.setValid(true);
ctrlValData.setValidity(true, false);
}
}
void AcsController::updateCtrlValData(double errAng, uint8_t safeModeStrat) {
PoolReadGuard pg(&ctrlValData);
if (pg.getReadResult() == returnvalue::OK) {
@ -608,17 +707,6 @@ void AcsController::updateCtrlValData(const double *tgtQuat, const double *errQu
}
}
void AcsController::disableCtrlValData() {
PoolReadGuard pg(&ctrlValData);
if (pg.getReadResult() == returnvalue::OK) {
std::memcpy(ctrlValData.tgtQuat.value, ZERO_VEC4, 4 * sizeof(double));
std::memcpy(ctrlValData.errQuat.value, ZERO_VEC4, 4 * sizeof(double));
ctrlValData.errAng.value = 0;
std::memcpy(ctrlValData.tgtRotRate.value, ZERO_VEC3, 3 * sizeof(double));
ctrlValData.setValidity(false, true);
}
}
ReturnValue_t AcsController::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) {
// MGM Raw
@ -689,6 +777,7 @@ ReturnValue_t AcsController::initializeLocalDataPool(localpool::DataPool &localD
localDataPoolMap.emplace(acsctrl::PoolIds::ALTITUDE, &altitude);
localDataPoolMap.emplace(acsctrl::PoolIds::GPS_POSITION, &gpsPosition);
localDataPoolMap.emplace(acsctrl::PoolIds::GPS_VELOCITY, &gpsVelocity);
localDataPoolMap.emplace(acsctrl::PoolIds::SOURCE, &gpsSource);
poolManager.subscribeForRegularPeriodicPacket({gpsDataProcessed.getSid(), enableHkSets, 30.0});
// MEKF
localDataPoolMap.emplace(acsctrl::PoolIds::QUAT_MEKF, &quatMekf);
@ -707,6 +796,14 @@ ReturnValue_t AcsController::initializeLocalDataPool(localpool::DataPool &localD
localDataPoolMap.emplace(acsctrl::PoolIds::RW_TARGET_SPEED, &rwTargetSpeed);
localDataPoolMap.emplace(acsctrl::PoolIds::MTQ_TARGET_DIPOLE, &mtqTargetDipole);
poolManager.subscribeForRegularPeriodicPacket({actuatorCmdData.getSid(), enableHkSets, 10.0});
// Fused Rot Rate
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_ORTHOGONAL, &rotRateOrthogonal);
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_PARALLEL, &rotRateParallel);
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_TOTAL, &rotRateTotal);
poolManager.subscribeForRegularPeriodicPacket({fusedRotRateData.getSid(), enableHkSets, 10.0});
// TLE Data
localDataPoolMap.emplace(acsctrl::PoolIds::TLE_LINE_1, &line1);
localDataPoolMap.emplace(acsctrl::PoolIds::TLE_LINE_2, &line2);
return returnvalue::OK;
}
@ -732,6 +829,8 @@ LocalPoolDataSetBase *AcsController::getDataSetHandle(sid_t sid) {
return &ctrlValData;
case acsctrl::ACTUATOR_CMD_DATA:
return &actuatorCmdData;
case acsctrl::FUSED_ROTATION_RATE_DATA:
return &fusedRotRateData;
default:
return nullptr;
}

View File

@ -3,6 +3,7 @@
#include <eive/objects.h>
#include <fsfw/controller/ExtendedControllerBase.h>
#include <fsfw/coordinates/Sgp4Propagator.h>
#include <fsfw/globalfunctions/math/VectorOperations.h>
#include <fsfw/health/HealthTable.h>
#include <fsfw/parameters/ParameterHelper.h>
@ -13,6 +14,7 @@
#include <mission/acs/rwHelpers.h>
#include <mission/acs/susMax1227Helpers.h>
#include <mission/controller/acs/ActuatorCmd.h>
#include <mission/controller/acs/FusedRotationEstimation.h>
#include <mission/controller/acs/Guidance.h>
#include <mission/controller/acs/MultiplicativeKalmanFilter.h>
#include <mission/controller/acs/Navigation.h>
@ -49,6 +51,7 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes
AcsParameters acsParameters;
SensorProcessing sensorProcessing;
FusedRotationEstimation fusedRotationEstimation;
Navigation navigation;
ActuatorCmd actuatorCmd;
Guidance guidance;
@ -59,6 +62,7 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes
ParameterHelper parameterHelper;
bool tleTooOldFlag = false;
uint8_t detumbleCounter = 0;
uint8_t multipleRwUnavailableCounter = 0;
bool mekfInvalidFlag = false;
@ -82,6 +86,7 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes
static const DeviceCommandId_t SOLAR_ARRAY_DEPLOYMENT_SUCCESSFUL = 0x0;
static const DeviceCommandId_t RESET_MEKF = 0x1;
static const DeviceCommandId_t RESTORE_MEKF_NONFINITE_RECOVERY = 0x2;
static const DeviceCommandId_t UPDATE_TLE = 0x3;
static const uint8_t INTERFACE_ID = CLASS_ID::ACS_CTRL;
//! [EXPORT] : [COMMENT] File deletion failed and at least one file is still existent.
@ -115,10 +120,10 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes
void updateActuatorCmdData(const int16_t* mtqTargetDipole);
void updateActuatorCmdData(const double* rwTargetTorque, const int32_t* rwTargetSpeed,
const int16_t* mtqTargetDipole);
void updateCtrlValData(uint8_t safeModeStrat);
void updateCtrlValData(double errAng, uint8_t safeModeStrat);
void updateCtrlValData(const double* tgtQuat, const double* errQuat, double errAng,
const double* tgtRotRate);
void disableCtrlValData();
/* ACS Sensor Values */
ACS::SensorValues sensorValues;
@ -205,6 +210,7 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes
PoolEntry<double> altitude = PoolEntry<double>();
PoolEntry<double> gpsPosition = PoolEntry<double>(3);
PoolEntry<double> gpsVelocity = PoolEntry<double>(3);
PoolEntry<uint8_t> gpsSource = PoolEntry<uint8_t>();
// MEKF
acsctrl::MekfData mekfData;
@ -226,6 +232,17 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes
PoolEntry<int32_t> rwTargetSpeed = PoolEntry<int32_t>(4);
PoolEntry<int16_t> mtqTargetDipole = PoolEntry<int16_t>(3);
// Fused Rot Rate
acsctrl::FusedRotRateData fusedRotRateData;
PoolEntry<double> rotRateOrthogonal = PoolEntry<double>(3);
PoolEntry<double> rotRateParallel = PoolEntry<double>(3);
PoolEntry<double> rotRateTotal = PoolEntry<double>(3);
// TLE Dataset
acsctrl::TleData tleData;
PoolEntry<uint8_t> line1 = PoolEntry<uint8_t>(69);
PoolEntry<uint8_t> line2 = PoolEntry<uint8_t>(69);
// Initial delay to make sure all pool variables have been initialized their owners
Countdown initialCountdown = Countdown(INIT_DELAY);
};

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
#ifndef MISSION_CONTROLLER_THERMALCONTROLLER_H_
#define MISSION_CONTROLLER_THERMALCONTROLLER_H_
#include <bsp_q7s/core/CoreDefinitions.h>
#include <bsp_q7s/core/defs.h>
#include <fsfw/controller/ExtendedControllerBase.h>
#include <fsfw/devicehandlers/DeviceHandlerThermalSet.h>
#include <fsfw/timemanager/Countdown.h>
@ -24,74 +24,7 @@
#include <atomic>
#include <list>
/**
* NOP Limit: Hard limit for device, usually from datasheet. Device damage is possible lif NOP limit
* is exceeded.
* OP Limit: Soft limit. Device should be switched off or TCS controller should take action if the
* limit is exceeded to avoid reaching NOP limit
*/
struct TempLimits {
TempLimits(float nopLowerLimit, float opLowerLimit, float cutOffLimit, float opUpperLimit,
float nopUpperLimit)
: opLowerLimit(opLowerLimit),
opUpperLimit(opUpperLimit),
cutOffLimit(cutOffLimit),
nopLowerLimit(nopLowerLimit),
nopUpperLimit(nopUpperLimit) {}
float opLowerLimit;
float opUpperLimit;
float cutOffLimit;
float nopLowerLimit;
float nopUpperLimit;
};
struct ThermalState {
uint8_t errorCounter;
// Is heating on for that thermal module?
bool heating = false;
heater::Switch heaterSwitch = heater::Switch::NUMBER_OF_SWITCHES;
// Heater start time and end times as UNIX seconds. Please note that these times will be updated
// when a switch command is sent, with no guarantess that the heater actually went on.
uint32_t heaterStartTime = 0;
uint32_t heaterEndTime = 0;
};
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
};
#include <optional>
class ThermalController : public ExtendedControllerBase {
public:
@ -102,8 +35,28 @@ class ThermalController : public ExtendedControllerBase {
static constexpr int16_t SANITY_LIMIT_LOWER_TEMP = -80;
static constexpr int16_t SANITY_LIMIT_UPPER_TEMP = 160;
// 1 hour
static constexpr uint32_t DEFAULT_MAX_HEATER_ON_DURATION_MS = 60 * 60 * 1000;
static constexpr uint32_t MAX_HEATER_ON_DURATIONS_MS[8] = {// PLOC PROC board
DEFAULT_MAX_HEATER_ON_DURATION_MS,
// PCDU PDU
DEFAULT_MAX_HEATER_ON_DURATION_MS,
// ACS Board
DEFAULT_MAX_HEATER_ON_DURATION_MS,
// OBC Board
DEFAULT_MAX_HEATER_ON_DURATION_MS,
// Camera
DEFAULT_MAX_HEATER_ON_DURATION_MS,
// STR
DEFAULT_MAX_HEATER_ON_DURATION_MS,
// DRO
DEFAULT_MAX_HEATER_ON_DURATION_MS,
// S-Band
DEFAULT_MAX_HEATER_ON_DURATION_MS};
ThermalController(object_id_t objectId, HeaterHandler& heater,
const std::atomic_bool& tcsBoardShortUnavailable);
const std::atomic_bool& tcsBoardShortUnavailable, bool pollPcdu1Tmp);
virtual ~ThermalController();
ReturnValue_t initialize() override;
@ -111,16 +64,16 @@ class ThermalController : public ExtendedControllerBase {
struct HeaterContext {
public:
HeaterContext(heater::Switch switchNr, heater::Switch redundantSwitchNr,
const TempLimits& tempLimit)
const tcsCtrl::TempLimits& tempLimit)
: switchNr(switchNr), redSwitchNr(redundantSwitchNr), tempLimit(tempLimit) {}
bool doHeaterHandling = true;
heater::Switch switchNr;
HeaterHandler::SwitchState switchState = HeaterHandler::SwitchState::OFF;
heater::SwitchState switchState = heater::SwitchState::OFF;
heater::Switch redSwitchNr;
const TempLimits& tempLimit;
const tcsCtrl::TempLimits& tempLimit;
};
void performThermalModuleCtrl(const HeaterSwitchStates& heaterSwitchStates);
void performThermalModuleCtrl(const tcsCtrl::HeaterSwitchStates& heaterSwitchStates);
ReturnValue_t handleCommandMessage(CommandMessage* message) override;
void performControlOperation() override;
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
@ -142,12 +95,12 @@ class ThermalController : public ExtendedControllerBase {
HeaterHandler& heaterHandler;
bool pollPcdu1Tmp;
tcsCtrl::SensorTemperatures sensorTemperatures;
tcsCtrl::SusTemperatures susTemperatures;
tcsCtrl::DeviceTemperatures deviceTemperatures;
tcsCtrl::HeaterInfo heaterInfo;
lp_vec_t<int16_t, 9> currentVecPdu2 =
lp_vec_t<int16_t, 9>(gp_id_t(objects::PDU2_HANDLER, PDU::pool::PDU_CURRENTS));
tcsCtrl::TcsCtrlInfo tcsCtrlInfo;
DeviceHandlerThermalSet imtqThermalSet;
@ -173,7 +126,7 @@ class ThermalController : public ExtendedControllerBase {
TMP1075::Tmp1075Dataset tmp1075SetTcs1;
TMP1075::Tmp1075Dataset tmp1075SetPlPcdu0;
// damaged
// TMP1075::Tmp1075Dataset tmp1075SetPlPcdu1;
TMP1075::Tmp1075Dataset* tmp1075SetPlPcdu1;
TMP1075::Tmp1075Dataset tmp1075SetIfBoard;
// SUS
@ -227,57 +180,67 @@ class ThermalController : public ExtendedControllerBase {
lp_var_t<float> tempMgm2 =
lp_var_t<float>(objects::MGM_2_LIS3_HANDLER, mgmLis3::TEMPERATURE_CELCIUS);
lp_var_t<float> tempAdcPayloadPcdu = lp_var_t<float>(objects::PLPCDU_HANDLER, plpcdu::TEMP);
lp_vec_t<int16_t, 9> currentVecPdu2 =
lp_vec_t<int16_t, 9>(gp_id_t(objects::PDU2_HANDLER, PDU::pool::PDU_CURRENTS));
// TempLimits
TempLimits acsBoardLimits = TempLimits(-40.0, -40.0, 80.0, 85.0, 85.0);
TempLimits mgtLimits = TempLimits(-40.0, -40.0, 65.0, 70.0, 70.0);
TempLimits rwLimits = TempLimits(-40.0, -40.0, 80.0, 85.0, 85.0);
TempLimits strLimits = TempLimits(-30.0, -20.0, 65.0, 70.0, 80.0);
TempLimits ifBoardLimits = TempLimits(-65.0, -40.0, 80.0, 85.0, 150.0);
TempLimits tcsBoardLimits = TempLimits(-60.0, -40.0, 80.0, 85.0, 130.0);
TempLimits obcLimits = TempLimits(-40.0, -40.0, 80.0, 85.0, 85.0);
TempLimits obcIfBoardLimits = TempLimits(-65.0, -40.0, 80.0, 85.0, 125.0);
TempLimits sBandTransceiverLimits = TempLimits(-40.0, -25.0, 35.0, 40.0, 65.0);
TempLimits pcduP60BoardLimits = TempLimits(-35.0, -35.0, 80.0, 85.0, 85.0);
TempLimits pcduAcuLimits = TempLimits(-35.0, -35.0, 80.0, 85.0, 85.0);
TempLimits pcduPduLimits = TempLimits(-35.0, -35.0, 80.0, 85.0, 85.0);
TempLimits plPcduBoardLimits = TempLimits(-55.0, -40.0, 80.0, 85.0, 125.0);
TempLimits plocMissionBoardLimits = TempLimits(-30.0, -10.0, 40.0, 45.0, 60);
TempLimits plocProcessingBoardLimits = TempLimits(-30.0, -10.0, 40.0, 45.0, 60.0);
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 scexBoardLimits = TempLimits(-60.0, -40.0, 80.0, 85.0, 150.0);
tcsCtrl::TempLimits acsBoardLimits = tcsCtrl::TempLimits(-40.0, -40.0, 80.0, 85.0, 85.0);
tcsCtrl::TempLimits mgtLimits = tcsCtrl::TempLimits(-40.0, -40.0, 65.0, 70.0, 70.0);
tcsCtrl::TempLimits rwLimits = tcsCtrl::TempLimits(-40.0, -40.0, 80.0, 85.0, 85.0);
tcsCtrl::TempLimits strLimits = tcsCtrl::TempLimits(-30.0, -20.0, 65.0, 70.0, 80.0);
tcsCtrl::TempLimits ifBoardLimits = tcsCtrl::TempLimits(-65.0, -40.0, 80.0, 85.0, 150.0);
tcsCtrl::TempLimits tcsBoardLimits = tcsCtrl::TempLimits(-60.0, -40.0, 80.0, 85.0, 130.0);
tcsCtrl::TempLimits obcLimits = tcsCtrl::TempLimits(-40.0, -40.0, 80.0, 85.0, 85.0);
tcsCtrl::TempLimits obcIfBoardLimits = tcsCtrl::TempLimits(-65.0, -40.0, 80.0, 85.0, 125.0);
tcsCtrl::TempLimits sBandTransceiverLimits = tcsCtrl::TempLimits(-40.0, -25.0, 35.0, 40.0, 65.0);
tcsCtrl::TempLimits pcduP60BoardLimits = tcsCtrl::TempLimits(-35.0, -35.0, 80.0, 85.0, 85.0);
tcsCtrl::TempLimits pcduAcuLimits = tcsCtrl::TempLimits(-35.0, -35.0, 80.0, 85.0, 85.0);
tcsCtrl::TempLimits pcduPduLimits = tcsCtrl::TempLimits(-35.0, -35.0, 80.0, 85.0, 85.0);
tcsCtrl::TempLimits plPcduBoardLimits = tcsCtrl::TempLimits(-55.0, -40.0, 80.0, 85.0, 125.0);
tcsCtrl::TempLimits plocMissionBoardLimits = tcsCtrl::TempLimits(-30.0, -10.0, 40.0, 45.0, 60);
tcsCtrl::TempLimits plocProcessingBoardLimits =
tcsCtrl::TempLimits(-30.0, -10.0, 40.0, 45.0, 60.0);
tcsCtrl::TempLimits dacLimits = tcsCtrl::TempLimits(-65.0, -40.0, 113.0, 118.0, 150.0);
tcsCtrl::TempLimits cameraLimits = tcsCtrl::TempLimits(-40.0, -30.0, 60.0, 65.0, 85.0);
tcsCtrl::TempLimits droLimits = tcsCtrl::TempLimits(-40.0, -30.0, 75.0, 80.0, 90.0);
tcsCtrl::TempLimits x8Limits = tcsCtrl::TempLimits(-40.0, -30.0, 75.0, 80.0, 90.0);
tcsCtrl::TempLimits hpaLimits = tcsCtrl::TempLimits(-40.0, -30.0, 75.0, 80.0, 90.0);
tcsCtrl::TempLimits txLimits = tcsCtrl::TempLimits(-40.0, -30.0, 75.0, 80.0, 90.0);
tcsCtrl::TempLimits mpaLimits = tcsCtrl::TempLimits(-40.0, -30.0, 75.0, 80.0, 90.0);
tcsCtrl::TempLimits scexBoardLimits = tcsCtrl::TempLimits(-60.0, -40.0, 80.0, 85.0, 150.0);
struct CtrlContext {
double sensorTemp = INVALID_TEMPERATURE;
uint8_t currentSensorIndex = 0;
tcsCtrl::ThermalComponents thermalComponent = tcsCtrl::NONE;
bool redSwitchNrInUse = false;
bool componentAboveCutOffLimit = false;
bool componentAboveUpperLimit = false;
Event overHeatEventToTrigger;
} ctrlCtx;
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 mgtTooHotFlag = false;
bool strTooHotFlag = false;
bool rwTooHotFlag = false;
struct TooHotFlags {
bool eBandTooHotFlag = false;
bool camTooHotOneShotFlag = false;
bool scexTooHotFlag = false;
bool plocTooHotFlag = false;
bool pcduSystemTooHotFlag = false;
bool syrlinksTooHotFlag = false;
bool obcTooHotFlag = false;
bool mgtTooHotFlag = false;
bool strTooHotFlag = false;
bool rwTooHotFlag = false;
} tooHotFlags;
bool transitionWhenHeatersOff = false;
uint32_t transitionWhenHeatersOffCycles = 0;
Mode_t targetMode = MODE_OFF;
Submode_t targetSubmode = SUBMODE_NONE;
uint32_t cycles = 0;
std::array<ThermalState, ThermalComponents::NUM_ENTRIES> thermalStates{};
std::array<HeaterState, heater::NUMBER_OF_SWITCHES> heaterStates{};
std::array<tcsCtrl::ThermalState, tcsCtrl::NUM_THERMAL_COMPONENTS> thermalStates{};
std::array<tcsCtrl::HeaterState, heater::NUMBER_OF_SWITCHES> heaterStates{};
// Initial delay to make sure all pool variables have been initialized their owners.
// Also, wait for system initialization to complete.
@ -298,6 +261,12 @@ class ThermalController : public ExtendedControllerBase {
PoolEntry<uint8_t> heaterSwitchStates = PoolEntry<uint8_t>(heater::NUMBER_OF_SWITCHES);
PoolEntry<int16_t> heaterCurrent = PoolEntry<int16_t>();
PoolEntry<uint8_t> tcsCtrlHeaterOn = PoolEntry<uint8_t>(tcsCtrl::NUM_THERMAL_COMPONENTS);
PoolEntry<uint8_t> tcsCtrlSensorIdx = PoolEntry<uint8_t>(tcsCtrl::NUM_THERMAL_COMPONENTS);
PoolEntry<uint8_t> tcsCtrlHeaterIdx = PoolEntry<uint8_t>(tcsCtrl::NUM_THERMAL_COMPONENTS);
PoolEntry<uint32_t> tcsCtrlStartTimes = PoolEntry<uint32_t>(tcsCtrl::NUM_THERMAL_COMPONENTS);
PoolEntry<uint32_t> tcsCtrlEndTimes = PoolEntry<uint32_t>(tcsCtrl::NUM_THERMAL_COMPONENTS);
static constexpr dur_millis_t MUTEX_TIMEOUT = 50;
void startTransition(Mode_t mode, Submode_t submode) override;
@ -319,8 +288,8 @@ class ThermalController : public ExtendedControllerBase {
bool selectAndReadSensorTemp(HeaterContext& htrCtx);
void heaterSwitchHelperAllOff();
void heaterSwitchHelper(heater::Switch switchNr, HeaterHandler::SwitchState state,
unsigned componentIdx);
void heaterSwitchHelper(heater::Switch switchNr, heater::SwitchState state,
std::optional<unsigned> componentIdx);
void ctrlAcsBoard();
void ctrlMgt();
@ -329,7 +298,6 @@ class ThermalController : public ExtendedControllerBase {
void ctrlIfBoard();
void ctrlTcsBoard();
void ctrlObc();
void ctrlObcIfBoard();
void ctrlSBandTransceiver();
void ctrlPcduP60Board();
void ctrlPcduAcu();
@ -345,7 +313,22 @@ class ThermalController : public ExtendedControllerBase {
void ctrlTx();
void ctrlMpa();
void ctrlScexBoard();
void heaterTransitionControl(const HeaterSwitchStates& currentHeaterStates);
/**
* The transition of heaters might take some time. As long as a transition is
* going on, the TCS controller works in a reduced form. This function takes care
* of tracking transition and capturing their completion.
* @param currentHeaterStates
*/
void heaterTransitionControl(const tcsCtrl::HeaterSwitchStates& currentHeaterStates);
/**
* Control tasks to prevent heaters being on for prolonged periods. Ideally, this
* should never happen, but this task prevents bugs from causing heaters to stay on
* for a long time, which draws a lot of power.
* @param currentHeaterStates
*/
void heaterMaxDurationControl(const tcsCtrl::HeaterSwitchStates& currentHeaterStates);
void crossCheckHeaterStateOfComponentsWhenHeaterGoesOff(heater::Switch switchIdx);
void setMode(Mode_t mode, Submode_t submode);
uint32_t tempFloatToU32() const;
bool tooHotHandler(object_id_t object, bool& oneShotFlag);

View File

@ -26,6 +26,9 @@ ReturnValue_t AcsParameters::getParameter(uint8_t domainId, uint8_t parameterId,
case 0x1:
parameterWrapper->set(onBoardParams.mekfViolationTimer);
break;
case 0x2:
parameterWrapper->set(onBoardParams.fusedRateSafeDuringEclipse);
break;
default:
return INVALID_IDENTIFIER_ID;
}
@ -105,8 +108,14 @@ ReturnValue_t AcsParameters::getParameter(uint8_t domainId, uint8_t parameterId,
parameterWrapper->setVector(mgmHandlingParameters.mgm4variance);
break;
case 0x12:
parameterWrapper->set(mgmHandlingParameters.mgmVectorFilterWeight);
break;
case 0x13:
parameterWrapper->set(mgmHandlingParameters.mgmDerivativeFilterWeight);
break;
case 0x14:
parameterWrapper->set(mgmHandlingParameters.useMgm4);
break;
default:
return INVALID_IDENTIFIER_ID;
}
@ -224,6 +233,12 @@ ReturnValue_t AcsParameters::getParameter(uint8_t domainId, uint8_t parameterId,
case 0x24:
parameterWrapper->set(susHandlingParameters.susBrightnessThreshold);
break;
case 0x25:
parameterWrapper->set(susHandlingParameters.susVectorFilterWeight);
break;
case 0x26:
parameterWrapper->set(susHandlingParameters.susRateFilterWeight);
break;
default:
return INVALID_IDENTIFIER_ID;
}
@ -339,26 +354,41 @@ ReturnValue_t AcsParameters::getParameter(uint8_t domainId, uint8_t parameterId,
parameterWrapper->set(safeModeControllerParameters.k_parallelMekf);
break;
case 0x3:
parameterWrapper->set(safeModeControllerParameters.k_orthoNonMekf);
parameterWrapper->set(safeModeControllerParameters.k_orthoGyr);
break;
case 0x4:
parameterWrapper->set(safeModeControllerParameters.k_alignNonMekf);
parameterWrapper->set(safeModeControllerParameters.k_alignGyr);
break;
case 0x5:
parameterWrapper->set(safeModeControllerParameters.k_parallelNonMekf);
parameterWrapper->set(safeModeControllerParameters.k_parallelGyr);
break;
case 0x6:
parameterWrapper->setVector(safeModeControllerParameters.sunTargetDirLeop);
parameterWrapper->set(safeModeControllerParameters.k_orthoSusMgm);
break;
case 0x7:
parameterWrapper->setVector(safeModeControllerParameters.sunTargetDir);
parameterWrapper->set(safeModeControllerParameters.k_alignSusMgm);
break;
case 0x8:
parameterWrapper->set(safeModeControllerParameters.useMekf);
parameterWrapper->set(safeModeControllerParameters.k_parallelSusMgm);
break;
case 0x9:
parameterWrapper->setVector(safeModeControllerParameters.sunTargetDirLeop);
break;
case 0xA:
parameterWrapper->setVector(safeModeControllerParameters.sunTargetDir);
break;
case 0xB:
parameterWrapper->set(safeModeControllerParameters.useMekf);
break;
case 0xC:
parameterWrapper->set(safeModeControllerParameters.useGyr);
break;
case 0xD:
parameterWrapper->set(safeModeControllerParameters.dampingDuringEclipse);
break;
case 0xE:
parameterWrapper->set(safeModeControllerParameters.sineLimitSunRotRate);
break;
default:
return INVALID_IDENTIFIER_ID;
}
@ -638,6 +668,9 @@ ReturnValue_t AcsParameters::getParameter(uint8_t domainId, uint8_t parameterId,
case 0x3:
parameterWrapper->set(gpsParameters.fdirAltitude);
break;
case 0x4:
parameterWrapper->set(gpsParameters.useSpg4);
break;
default:
return INVALID_IDENTIFIER_ID;
}

View File

@ -19,6 +19,7 @@ class AcsParameters : public HasParametersIF {
struct OnBoardParams {
double sampleTime = 0.4; // [s]
uint16_t mekfViolationTimer = 750;
uint8_t fusedRateSafeDuringEclipse = true;
} onBoardParams;
struct InertiaEIVE {
@ -77,7 +78,9 @@ class AcsParameters : public HasParametersIF {
float mgm02variance[3] = {pow(3.2e-7, 2), pow(3.2e-7, 2), pow(4.1e-7, 2)};
float mgm13variance[3] = {pow(1.5e-8, 2), pow(1.5e-8, 2), pow(1.5e-8, 2)};
float mgm4variance[3] = {pow(1.7e-6, 2), pow(1.7e-6, 2), pow(1.7e-6, 2)};
float mgmDerivativeFilterWeight = 0.5;
float mgmVectorFilterWeight = 0.85;
float mgmDerivativeFilterWeight = 0.99;
uint8_t useMgm4 = false;
} mgmHandlingParameters;
struct SusHandlingParameters {
@ -767,6 +770,8 @@ class AcsParameters : public HasParametersIF {
0.167666815691513, 0.163137400730063, -0.000609874123906977, -0.00205336098697513,
-0.000889232196185857, -0.00168429567131815}};
float susBrightnessThreshold = 0.7;
float susVectorFilterWeight = .85;
float susRateFilterWeight = .99;
} susHandlingParameters;
struct GyrHandlingParameters {
@ -825,15 +830,22 @@ class AcsParameters : public HasParametersIF {
double k_alignMekf = 4.0e-5;
double k_parallelMekf = 3.75e-4;
double k_orthoNonMekf = 4.4e-3;
double k_alignNonMekf = 4.0e-5;
double k_parallelNonMekf = 3.75e-4;
double k_orthoGyr = 4.4e-3;
double k_alignGyr = 4.0e-5;
double k_parallelGyr = 3.75e-4;
double k_orthoSusMgm = 4.4e-3;
double k_alignSusMgm = 4.0e-5;
double k_parallelSusMgm = 3.75e-4;
double sunTargetDirLeop[3] = {0, sqrt(.5), sqrt(.5)};
double sunTargetDir[3] = {0, 0, 1};
uint8_t useMekf = false;
uint8_t useGyr = false;
uint8_t dampingDuringEclipse = true;
float sineLimitSunRotRate = 0.24;
} safeModeControllerParameters;
struct PointingLawParameters {
@ -905,6 +917,7 @@ class AcsParameters : public HasParametersIF {
double minimumFdirAltitude = 475 * 1e3; // [m]
double maximumFdirAltitude = 575 * 1e3; // [m]
double fdirAltitude = 525 * 1e3; // [m]
uint8_t useSpg4 = true;
} gpsParameters;
struct SunModelParameters {

View File

@ -2,6 +2,7 @@ target_sources(
${LIB_EIVE_MISSION}
PRIVATE AcsParameters.cpp
ActuatorCmd.cpp
FusedRotationEstimation.cpp
Guidance.cpp
Igrf13Model.cpp
MultiplicativeKalmanFilter.cpp

View File

@ -0,0 +1,116 @@
#include "FusedRotationEstimation.h"
FusedRotationEstimation::FusedRotationEstimation(AcsParameters *acsParameters_) {
acsParameters = acsParameters_;
}
void FusedRotationEstimation::estimateFusedRotationRateSafe(
acsctrl::SusDataProcessed *susDataProcessed, acsctrl::MgmDataProcessed *mgmDataProcessed,
acsctrl::GyrDataProcessed *gyrDataProcessed, acsctrl::FusedRotRateData *fusedRotRateData) {
if ((not mgmDataProcessed->mgmVecTot.isValid() and not susDataProcessed->susVecTot.isValid() and
not fusedRotRateData->rotRateTotal.isValid()) or
(not susDataProcessed->susVecTotDerivative.isValid() and
not mgmDataProcessed->mgmVecTotDerivative.isValid())) {
{
PoolReadGuard pg(fusedRotRateData);
std::memcpy(fusedRotRateData->rotRateOrthogonal.value, ZERO_VEC, 3 * sizeof(double));
std::memcpy(fusedRotRateData->rotRateParallel.value, ZERO_VEC, 3 * sizeof(double));
std::memcpy(fusedRotRateData->rotRateTotal.value, ZERO_VEC, 3 * sizeof(double));
fusedRotRateData->setValidity(false, true);
}
// store for calculation of angular acceleration
if (gyrDataProcessed->gyrVecTot.isValid()) {
std::memcpy(rotRateOldB, gyrDataProcessed->gyrVecTot.value, 3 * sizeof(double));
}
return;
}
if (not susDataProcessed->susVecTot.isValid()) {
estimateFusedRotationRateEclipse(gyrDataProcessed, fusedRotRateData);
// store for calculation of angular acceleration
if (gyrDataProcessed->gyrVecTot.isValid()) {
std::memcpy(rotRateOldB, gyrDataProcessed->gyrVecTot.value, 3 * sizeof(double));
}
return;
}
// calculate rotation around the sun
double magSunCross[3] = {0, 0, 0};
VectorOperations<double>::cross(mgmDataProcessed->mgmVecTot.value,
susDataProcessed->susVecTot.value, magSunCross);
double magSunCrossNorm = VectorOperations<double>::norm(magSunCross, 3);
double magNorm = VectorOperations<double>::norm(mgmDataProcessed->mgmVecTot.value, 3);
double fusedRotRateParallel[3] = {0, 0, 0};
if (magSunCrossNorm >
(acsParameters->safeModeControllerParameters.sineLimitSunRotRate * magNorm)) {
double omegaParallel =
VectorOperations<double>::dot(mgmDataProcessed->mgmVecTotDerivative.value, magSunCross) *
pow(magSunCrossNorm, -2);
VectorOperations<double>::mulScalar(susDataProcessed->susVecTot.value, omegaParallel,
fusedRotRateParallel, 3);
} else {
estimateFusedRotationRateEclipse(gyrDataProcessed, fusedRotRateData);
// store for calculation of angular acceleration
if (gyrDataProcessed->gyrVecTot.isValid()) {
std::memcpy(rotRateOldB, gyrDataProcessed->gyrVecTot.value, 3 * sizeof(double));
}
return;
}
// calculate rotation orthogonal to the sun
double fusedRotRateOrthogonal[3] = {0, 0, 0};
VectorOperations<double>::cross(susDataProcessed->susVecTotDerivative.value,
susDataProcessed->susVecTot.value, fusedRotRateOrthogonal);
VectorOperations<double>::mulScalar(
fusedRotRateOrthogonal,
pow(VectorOperations<double>::norm(susDataProcessed->susVecTot.value, 3), -2),
fusedRotRateOrthogonal, 3);
// calculate total rotation rate
double fusedRotRateTotal[3] = {0, 0, 0};
VectorOperations<double>::add(fusedRotRateParallel, fusedRotRateOrthogonal, fusedRotRateTotal);
{
PoolReadGuard pg(fusedRotRateData);
std::memcpy(fusedRotRateData->rotRateOrthogonal.value, fusedRotRateOrthogonal,
3 * sizeof(double));
std::memcpy(fusedRotRateData->rotRateParallel.value, fusedRotRateParallel, 3 * sizeof(double));
std::memcpy(fusedRotRateData->rotRateTotal.value, fusedRotRateTotal, 3 * sizeof(double));
fusedRotRateData->setValidity(true, true);
}
// store for calculation of angular acceleration
if (gyrDataProcessed->gyrVecTot.isValid()) {
std::memcpy(rotRateOldB, gyrDataProcessed->gyrVecTot.value, 3 * sizeof(double));
}
}
void FusedRotationEstimation::estimateFusedRotationRateEclipse(
acsctrl::GyrDataProcessed *gyrDataProcessed, acsctrl::FusedRotRateData *fusedRotRateData) {
if (not acsParameters->onBoardParams.fusedRateSafeDuringEclipse or
not gyrDataProcessed->gyrVecTot.isValid() or
VectorOperations<double>::norm(fusedRotRateData->rotRateTotal.value, 3) == 0) {
{
PoolReadGuard pg(fusedRotRateData);
std::memcpy(fusedRotRateData->rotRateOrthogonal.value, ZERO_VEC, 3 * sizeof(double));
std::memcpy(fusedRotRateData->rotRateParallel.value, ZERO_VEC, 3 * sizeof(double));
std::memcpy(fusedRotRateData->rotRateTotal.value, ZERO_VEC, 3 * sizeof(double));
fusedRotRateData->setValidity(false, true);
}
return;
}
double angAccelB[3] = {0, 0, 0};
VectorOperations<double>::subtract(gyrDataProcessed->gyrVecTot.value, rotRateOldB, angAccelB, 3);
double fusedRotRateTotal[3] = {0, 0, 0};
VectorOperations<double>::add(fusedRotRateData->rotRateTotal.value, angAccelB, fusedRotRateTotal,
3);
{
PoolReadGuard pg(fusedRotRateData);
std::memcpy(fusedRotRateData->rotRateOrthogonal.value, ZERO_VEC, 3 * sizeof(double));
fusedRotRateData->rotRateOrthogonal.setValid(false);
std::memcpy(fusedRotRateData->rotRateParallel.value, ZERO_VEC, 3 * sizeof(double));
fusedRotRateData->rotRateParallel.setValid(false);
std::memcpy(fusedRotRateData->rotRateTotal.value, fusedRotRateTotal, 3 * sizeof(double));
fusedRotRateData->rotRateTotal.setValid(true);
}
}

View File

@ -0,0 +1,29 @@
#ifndef MISSION_CONTROLLER_ACS_FUSEDROTATIONESTIMATION_H_
#define MISSION_CONTROLLER_ACS_FUSEDROTATIONESTIMATION_H_
#include <fsfw/datapool/PoolReadGuard.h>
#include <fsfw/globalfunctions/math/VectorOperations.h>
#include <mission/controller/acs/AcsParameters.h>
#include <mission/controller/controllerdefinitions/AcsCtrlDefinitions.h>
class FusedRotationEstimation {
public:
FusedRotationEstimation(AcsParameters *acsParameters_);
void estimateFusedRotationRateSafe(acsctrl::SusDataProcessed *susDataProcessed,
acsctrl::MgmDataProcessed *mgmDataProcessed,
acsctrl::GyrDataProcessed *gyrDataProcessed,
acsctrl::FusedRotRateData *fusedRotRateData);
protected:
private:
static constexpr double ZERO_VEC[3] = {0, 0, 0};
AcsParameters *acsParameters;
double rotRateOldB[3] = {0, 0, 0};
void estimateFusedRotationRateEclipse(acsctrl::GyrDataProcessed *gyrDataProcessed,
acsctrl::FusedRotRateData *fusedRotRateData);
};
#endif /* MISSION_CONTROLLER_ACS_FUSEDROTATIONESTIMATION_H_ */

View File

@ -44,3 +44,40 @@ ReturnValue_t Navigation::useMekf(ACS::SensorValues *sensorValues,
void Navigation::resetMekf(acsctrl::MekfData *mekfData) {
mekfStatus = multiplicativeKalmanFilter.reset(mekfData);
}
ReturnValue_t Navigation::useSpg4(timeval now, acsctrl::GpsDataProcessed *gpsDataProcessed) {
double position[3] = {0, 0, 0};
double velocity[3] = {0, 0, 0};
ReturnValue_t result = sgp4Propagator.propagate(position, velocity, now, 0);
if (result == returnvalue::OK) {
{
PoolReadGuard pg(gpsDataProcessed);
if (pg.getReadResult() == returnvalue::OK) {
gpsDataProcessed->source = acs::GpsSource::SPG4;
gpsDataProcessed->source.setValid(true);
std::memcpy(gpsDataProcessed->gpsPosition.value, position, 3 * sizeof(double));
gpsDataProcessed->gpsPosition.setValid(true);
std::memcpy(gpsDataProcessed->gpsVelocity.value, velocity, 3 * sizeof(double));
gpsDataProcessed->gpsVelocity.setValid(true);
}
}
} else {
{
PoolReadGuard pg(gpsDataProcessed);
if (pg.getReadResult() == returnvalue::OK) {
gpsDataProcessed->source = acs::GpsSource::NONE;
gpsDataProcessed->source.setValid(true);
std::memcpy(gpsDataProcessed->gpsPosition.value, position, 3 * sizeof(double));
gpsDataProcessed->gpsPosition.setValid(false);
std::memcpy(gpsDataProcessed->gpsVelocity.value, velocity, 3 * sizeof(double));
gpsDataProcessed->gpsVelocity.setValid(false);
}
}
}
return result;
}
ReturnValue_t Navigation::updateTle(const uint8_t *line1, const uint8_t *line2) {
return sgp4Propagator.initialize(line1, line2);
}

View File

@ -1,11 +1,13 @@
#ifndef NAVIGATION_H_
#define NAVIGATION_H_
#include "../controllerdefinitions/AcsCtrlDefinitions.h"
#include "AcsParameters.h"
#include "MultiplicativeKalmanFilter.h"
#include "SensorProcessing.h"
#include "SensorValues.h"
#include <fsfw/coordinates/Sgp4Propagator.h>
#include <mission/acs/defs.h>
#include <mission/controller/acs/AcsParameters.h>
#include <mission/controller/acs/MultiplicativeKalmanFilter.h>
#include <mission/controller/acs/SensorProcessing.h>
#include <mission/controller/acs/SensorValues.h>
#include <mission/controller/controllerdefinitions/AcsCtrlDefinitions.h>
class Navigation {
public:
@ -19,10 +21,14 @@ class Navigation {
AcsParameters *acsParameters);
void resetMekf(acsctrl::MekfData *mekfData);
ReturnValue_t useSpg4(timeval now, acsctrl::GpsDataProcessed *gpsDataProcessed);
ReturnValue_t updateTle(const uint8_t *line1, const uint8_t *line2);
protected:
private:
MultiplicativeKalmanFilter multiplicativeKalmanFilter;
ReturnValue_t mekfStatus = MultiplicativeKalmanFilter::MEKF_UNINITIALIZED;
Sgp4Propagator sgp4Propagator;
};
#endif /* ACS_NAVIGATION_H_ */

View File

@ -1,19 +1,5 @@
#include "SensorProcessing.h"
#include <fsfw/datapool/PoolReadGuard.h>
#include <fsfw/globalfunctions/constants.h>
#include <fsfw/globalfunctions/math/MatrixOperations.h>
#include <fsfw/globalfunctions/math/QuaternionOperations.h>
#include <fsfw/globalfunctions/math/VectorOperations.h>
#include <fsfw/globalfunctions/timevalOperations.h>
#include <math.h>
#include "../controllerdefinitions/AcsCtrlDefinitions.h"
#include "Igrf13Model.h"
#include "util/MathOperations.h"
using namespace Math;
SensorProcessing::SensorProcessing() {}
SensorProcessing::~SensorProcessing() {}
@ -24,21 +10,23 @@ void SensorProcessing::processMgm(const float *mgm0Value, bool mgm0valid, const
bool mgm4valid, timeval timeOfMgmMeasurement,
const AcsParameters::MgmHandlingParameters *mgmParameters,
acsctrl::GpsDataProcessed *gpsDataProcessed,
const double gpsAltitude, bool gpsValid,
acsctrl::MgmDataProcessed *mgmDataProcessed) {
// ---------------- IGRF- 13 Implementation here
// ------------------------------------------------
double magIgrfModel[3] = {0.0, 0.0, 0.0};
if (gpsValid) {
bool gpsValid = false;
if (gpsDataProcessed->source.value != acs::GpsSource::NONE) {
Igrf13Model igrf13;
igrf13.schmidtNormalization();
igrf13.updateCoeffGH(timeOfMgmMeasurement);
// maybe put a condition here, to only update after a full day, this
// class function has around 700 steps to perform
igrf13.magFieldComp(gpsDataProcessed->gdLongitude.value, gpsDataProcessed->gcLatitude.value,
gpsAltitude, timeOfMgmMeasurement, magIgrfModel);
gpsDataProcessed->altitude.value, timeOfMgmMeasurement, magIgrfModel);
gpsValid = true;
}
if (!mgm0valid && !mgm1valid && !mgm2valid && !mgm3valid && !mgm4valid) {
if (not mgm0valid and not mgm1valid and not mgm2valid and not mgm3valid and
(not mgm4valid or not mgmParameters->useMgm4)) {
{
PoolReadGuard pg(mgmDataProcessed);
if (pg.getReadResult() == returnvalue::OK) {
@ -54,6 +42,7 @@ void SensorProcessing::processMgm(const float *mgm0Value, bool mgm0valid, const
mgmDataProcessed->magIgrfModel.setValid(gpsValid);
}
}
std::memcpy(savedMgmVecTot, ZERO_VEC_D, sizeof(savedMgmVecTot));
return;
}
float mgm0ValueNoBias[3] = {0, 0, 0}, mgm1ValueNoBias[3] = {0, 0, 0},
@ -113,7 +102,7 @@ void SensorProcessing::processMgm(const float *mgm0Value, bool mgm0valid, const
sensorFusionDenominator[i] += 1 / mgmParameters->mgm13variance[i];
}
}
if (mgm4valid) {
if (mgm4valid and mgmParameters->useMgm4) {
float mgm4ValueUT[3];
VectorOperations<float>::mulScalar(mgm4Value, 1e-3, mgm4ValueUT, 3); // nT to uT
MatrixOperations<float>::multiply(mgmParameters->mgm4orientationMatrix[0], mgm4ValueUT,
@ -132,19 +121,23 @@ void SensorProcessing::processMgm(const float *mgm0Value, bool mgm0valid, const
for (uint8_t i = 0; i < 3; i++) {
mgmVecTot[i] = sensorFusionNumerator[i] / sensorFusionDenominator[i];
}
if (VectorOperations<double>::norm(mgmVecTot, 3) != 0 and mgmDataProcessed->mgmVecTot.isValid()) {
lowPassFilter(mgmVecTot, mgmDataProcessed->mgmVecTot.value,
mgmParameters->mgmVectorFilterWeight);
}
//-----------------------Mgm Rate Computation ---------------------------------------------------
double mgmVecTotDerivative[3] = {0.0, 0.0, 0.0};
bool mgmVecTotDerivativeValid = false;
double timeDiff = timevalOperations::toDouble(timeOfMgmMeasurement - timeOfSavedMagFieldEst);
if (timeOfSavedMagFieldEst.tv_sec != 0 and timeDiff > 0) {
for (uint8_t i = 0; i < 3; i++) {
mgmVecTotDerivative[i] = (mgmVecTot[i] - savedMgmVecTot[i]) / timeDiff;
savedMgmVecTot[i] = mgmVecTot[i];
mgmVecTotDerivativeValid = true;
}
if (timeOfSavedMagFieldEst.tv_sec != 0 and timeDiff > 0 and
VectorOperations<double>::norm(savedMgmVecTot, 3) != 0) {
VectorOperations<double>::subtract(mgmVecTot, savedMgmVecTot, mgmVecTotDerivative, 3);
VectorOperations<double>::mulScalar(mgmVecTotDerivative, 1. / timeDiff, mgmVecTotDerivative, 3);
mgmVecTotDerivativeValid = true;
}
timeOfSavedMagFieldEst = timeOfMgmMeasurement;
std::memcpy(savedMgmVecTot, mgmVecTot, sizeof(savedMgmVecTot));
if (VectorOperations<double>::norm(mgmVecTotDerivative, 3) != 0 and
mgmDataProcessed->mgmVecTotDerivative.isValid()) {
@ -195,8 +188,8 @@ void SensorProcessing::processSus(
double JC2000 = JD2000 / 36525.;
double meanLongitude =
sunModelParameters->omega_0 + (sunModelParameters->domega * JC2000) * PI / 180.;
double meanAnomaly = (sunModelParameters->m_0 + sunModelParameters->dm * JC2000) * PI / 180.;
sunModelParameters->omega_0 + (sunModelParameters->domega * JC2000) * M_PI / 180.;
double meanAnomaly = (sunModelParameters->m_0 + sunModelParameters->dm * JC2000) * M_PI / 180.;
double eclipticLongitude = meanLongitude + sunModelParameters->p1 * sin(meanAnomaly) +
sunModelParameters->p2 * sin(2 * meanAnomaly);
@ -273,6 +266,7 @@ void SensorProcessing::processSus(
susDataProcessed->sunIjkModel.setValid(true);
}
}
std::memcpy(savedSusVecTot, ZERO_VEC_D, sizeof(savedSusVecTot));
return;
}
@ -351,17 +345,27 @@ void SensorProcessing::processSus(
double susVecTot[3] = {0.0, 0.0, 0.0};
VectorOperations<double>::normalize(susMeanValue, susVecTot, 3);
if (VectorOperations<double>::norm(susVecTot, 3) != 0 and susDataProcessed->susVecTot.isValid()) {
lowPassFilter(susVecTot, susDataProcessed->susVecTot.value,
susParameters->susVectorFilterWeight);
}
/* -------- Sun Derivatiative --------------------- */
double susVecTotDerivative[3] = {0.0, 0.0, 0.0};
bool susVecTotDerivativeValid = false;
double timeDiff = timevalOperations::toDouble(timeOfSusMeasurement - timeOfSavedSusDirEst);
if (timeOfSavedSusDirEst.tv_sec != 0 and timeDiff > 0) {
for (uint8_t i = 0; i < 3; i++) {
susVecTotDerivative[i] = (susVecTot[i] - savedSusVecTot[i]) / timeDiff;
savedSusVecTot[i] = susVecTot[i];
susVecTotDerivativeValid = true;
}
if (timeOfSavedSusDirEst.tv_sec != 0 and timeDiff > 0 and
VectorOperations<double>::norm(savedSusVecTot, 3) != 0) {
VectorOperations<double>::subtract(susVecTot, savedSusVecTot, susVecTotDerivative, 3);
VectorOperations<double>::mulScalar(susVecTotDerivative, 1. / timeDiff, susVecTotDerivative, 3);
susVecTotDerivativeValid = true;
}
std::memcpy(savedSusVecTot, susVecTot, sizeof(savedSusVecTot));
if (VectorOperations<double>::norm(susVecTotDerivative, 3) != 0 and
susDataProcessed->susVecTotDerivative.isValid()) {
lowPassFilter(susVecTotDerivative, susDataProcessed->susVecTotDerivative.value,
susParameters->susRateFilterWeight);
}
timeOfSavedSusDirEst = timeOfSusMeasurement;
{
@ -521,14 +525,31 @@ void SensorProcessing::processGps(const double gpsLatitude, const double gpsLong
const bool validGps,
const AcsParameters::GpsParameters *gpsParameters,
acsctrl::GpsDataProcessed *gpsDataProcessed) {
double gdLongitude = 0, gcLatitude = 0, altitude = 0, posSatE[3] = {0, 0, 0},
// init variables
double gdLongitude = 0, gdLatitude = 0, gcLatitude = 0, altitude = 0, posSatE[3] = {0, 0, 0},
gpsVelocityE[3] = {0, 0, 0};
if (validGps) {
// Transforming from Degree to Radians and calculation geocentric lattitude from geodetic
gdLongitude = gpsLongitude * PI / 180.;
double latitudeRad = gpsLatitude * PI / 180.;
double eccentricityWgs84 = 0.0818195;
double factor = 1 - pow(eccentricityWgs84, 2);
uint8_t gpsSource = acs::GpsSource::NONE;
// We do not trust the GPS and therefore it shall die here if SPG4 is running
if (gpsDataProcessed->source.value == acs::GpsSource::SPG4 and gpsParameters->useSpg4) {
MathOperations<double>::latLongAltFromCartesian(gpsDataProcessed->gpsPosition.value, gdLatitude,
gdLongitude, altitude);
double factor = 1 - pow(ECCENTRICITY_WGS84, 2);
gcLatitude = atan(factor * tan(gdLatitude));
{
PoolReadGuard pg(gpsDataProcessed);
if (pg.getReadResult() == returnvalue::OK) {
gpsDataProcessed->gdLongitude.value = gdLongitude;
gpsDataProcessed->gcLatitude.value = gcLatitude;
gpsDataProcessed->altitude.value = altitude;
gpsDataProcessed->setValidity(true, true);
}
}
return;
} else if (validGps) {
// Transforming from Degree to Radians and calculation geocentric latitude from geodetic
gdLongitude = gpsLongitude * M_PI / 180.;
double latitudeRad = gpsLatitude * M_PI / 180.;
double factor = 1 - pow(ECCENTRICITY_WGS84, 2);
gcLatitude = atan(factor * tan(latitudeRad));
// Altitude FDIR
@ -555,6 +576,8 @@ void SensorProcessing::processGps(const double gpsLatitude, const double gpsLong
timeOfSavedPosSatE = gpsUnixSeconds;
validSavedPosSatE = true;
gpsSource = acs::GpsSource::GPS;
}
{
PoolReadGuard pg(gpsDataProcessed);
@ -565,6 +588,8 @@ void SensorProcessing::processGps(const double gpsLatitude, const double gpsLong
std::memcpy(gpsDataProcessed->gpsPosition.value, posSatE, 3 * sizeof(double));
std::memcpy(gpsDataProcessed->gpsVelocity.value, gpsVelocityE, 3 * sizeof(double));
gpsDataProcessed->setValidity(validGps, true);
gpsDataProcessed->source.value = gpsSource;
gpsDataProcessed->source.setValid(true);
}
}
}
@ -592,11 +617,7 @@ void SensorProcessing::process(timeval now, ACS::SensorValues *sensorValues,
sensorValues->mgm3Rm3100Set.fieldStrengths.value,
sensorValues->mgm3Rm3100Set.fieldStrengths.isValid(),
sensorValues->imtqMgmSet.mtmRawNt.value, sensorValues->imtqMgmSet.mtmRawNt.isValid(),
now, &acsParameters->mgmHandlingParameters, gpsDataProcessed,
sensorValues->gpsSet.altitude.value,
(sensorValues->gpsSet.latitude.isValid() && sensorValues->gpsSet.longitude.isValid() &&
sensorValues->gpsSet.altitude.isValid()),
mgmDataProcessed);
now, &acsParameters->mgmHandlingParameters, gpsDataProcessed, mgmDataProcessed);
processSus(sensorValues->susSets[0].channels.value, sensorValues->susSets[0].channels.isValid(),
sensorValues->susSets[1].channels.value, sensorValues->susSets[1].channels.isValid(),

Some files were not shown because too many files have changed in this diff Show More