Compare commits

..

575 Commits

Author SHA1 Message Date
221d7b408a using new docker container name
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-03-02 18:01:21 +01:00
f413ed6f7d Merge branch 'mohr/buildfix' into mohr/catch2 2022-03-02 17:52:41 +01:00
05bd1cc8c6 forgot one
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-03-02 17:47:48 +01:00
2f51f58c7e Merge branch 'develop' into mohr/catch2
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-03-02 17:12:24 +01:00
182b90ee6d small fixes
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-03-02 17:04:58 +01:00
Uli
606da48861 changing fs.mqueue.msg_max for docker to be able to run unit tests
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-03-02 16:02:23 +01:00
b8a4384c91 Merge pull request 'use new cmake option' (#160) from mueller/small-rpi-fix into develop
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Reviewed-on: #160
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-03-01 17:56:17 +01:00
6faea8a33b Merge pull request 'updated API to take reference instead of pointer' (#161) from mueller/nvm-json-base-update into develop
Reviewed-on: #161
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-03-01 17:55:45 +01:00
e0e0554fea update Q7S test task for API change
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-03-01 17:54:43 +01:00
b8bd211d8e updated API to take reference instead of pointer
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-03-01 17:52:39 +01:00
54fb646ea1 Merge remote-tracking branch 'origin/develop' into mueller/small-rpi-fix
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop Build started...
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-03-01 17:50:33 +01:00
dae901a45e Merge pull request 'progress printer' (#158) from meier/startracker into develop
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Reviewed-on: #158
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2022-03-01 17:50:11 +01:00
27f9c0223c use new cmake option
Some checks failed
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-03-01 17:48:05 +01:00
f8942cd6c6 Merge branch 'develop' into meier/startracker
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build queued...
EIVE/eive-obsw/pipeline/head Build started...
2022-03-01 17:25:05 +01:00
81915f1772 Merge pull request 'Reboot File Handling' (#154) from mueller/reboot-file-handling into develop
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Reviewed-on: #154
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-03-01 17:24:27 +01:00
033bdb93ad fixed conflict
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-03-01 17:22:55 +01:00
57b815c8ee progress printer
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-03-01 17:17:15 +01:00
23e2c5ffc8 repoint fsfw
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-03-01 15:23:01 +01:00
66ece6544e Merge remote-tracking branch 'origin/develop' into mueller/reboot-file-handling 2022-03-01 15:22:43 +01:00
7f71ee82ec Merge pull request 'GPIO HAL Update' (#156) from mueller/gpio-hal-update into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #156
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-03-01 15:19:57 +01:00
9e03f9babe apply clang format to unittest folder as well
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-03-01 15:06:59 +01:00
be122038ed small but important bugfix
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-03-01 14:56:19 +01:00
84367f8424 small tweak
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-03-01 14:51:12 +01:00
e1112f1903 extension for additional safety
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-03-01 14:44:50 +01:00
684d9b8059 repoint fsfw
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-03-01 13:35:36 +01:00
4a5ad4fb4d updated OBSW code 2022-03-01 13:34:12 +01:00
b279434ef0 update gitignore
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-03-01 13:05:34 +01:00
daa3b0084a extended reboot file handling
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-03-01 11:57:48 +01:00
65961695de small README
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-28 20:35:05 +01:00
1c17aac544 added last unittests
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-28 20:27:24 +01:00
165e6e829e bugfix by inspection
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-28 20:24:40 +01:00
0d1ff8585c various bugfixes from unittest
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-28 19:52:43 +01:00
d4dcd8c03f added missing command
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-28 16:55:49 +01:00
8e8fe3d0c9 some more fixes
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-28 16:48:13 +01:00
8c2c402821 continued tests, first fixes
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-28 16:47:36 +01:00
a2bc72a798 improved mount logic, create conf folder is missing
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-28 16:35:16 +01:00
8e6d8a6fa8 use catch2 main
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-28 16:05:32 +01:00
ff35986a16 fsfw update
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-28 15:59:33 +01:00
1684c28e0f fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-28 15:51:19 +01:00
54640147c1 GPIO hal update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-28 15:47:34 +01:00
042acc1a23 reboot logic unittest init
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-28 14:13:31 +01:00
ba68c80d6b Merge remote-tracking branch 'origin/develop' into mueller/reboot-file-handling
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-28 13:29:22 +01:00
6b88c525b2 Merge pull request 'meier/startracker' (#155) from meier/startracker into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #155
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2022-02-28 13:25:38 +01:00
c88ed9616d tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-27 16:52:51 +01:00
f88674ed59 applied clang formatting 2022-02-27 15:48:42 +01:00
dfd817d27b refactored star tracker handler 2022-02-27 15:46:06 +01:00
e61dfc0401 fixed conflicts 2022-02-25 14:39:18 +01:00
e082f3973a star tracker flash read 2022-02-25 14:24:51 +01:00
da78e57dd3 cleanDocker
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-25 13:24:44 +01:00
dfaaae5512 cleanDocker 2022-02-25 13:24:34 +01:00
55618e381c update README
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-25 13:20:17 +01:00
3a6c7e3183 separate branch for reboot file handling
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-25 11:34:42 +01:00
00bd6e260a fsfw and tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-25 11:32:08 +01:00
486fa9cae2 Merge pull request 'moved gps handler and deployment handler' (#152) from mueller/move-deply-handler into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #152
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-02-25 11:22:52 +01:00
39f4ef6ccb remove faulty include
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-02-25 11:21:34 +01:00
cca0d5735e Merge remote-tracking branch 'origin/develop' into mueller/move-deply-handler
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-25 11:18:35 +01:00
9010f58636 Merge pull request 'PL PCDU Preparation + Update for new Devicetree' (#153) from mueller/pl-pcdu-prep into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #153
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-02-25 11:12:09 +01:00
33ff05c558 Merge remote-tracking branch 'origin/develop' into mueller/pl-pcdu-prep
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-24 23:46:06 +01:00
e01f2a8947 Merge branch 'develop' into mueller/move-deply-handler
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-02-24 17:37:46 +01:00
3593f5ab8c corrected output 2022-02-24 16:42:07 +01:00
9eb990b3a2 Merge pull request 'Use RADFET Enable Pin' (#149) from mueller/rad-sensor-update into develop
Some checks reported errors
EIVE/eive-obsw/pipeline/head Something is wrong with the build of this commit
Reviewed-on: #149
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-02-24 14:11:05 +01:00
2419e9fcc6 commands to disable and enable star tracker filename timestamping
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-24 13:47:52 +01:00
5bf4e50849 clean up includes
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-02-24 12:02:23 +01:00
3edf7572b6 order
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-24 11:58:11 +01:00
768bb14842 minor tweaks
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-02-24 11:57:35 +01:00
e56532367f check returnvalue
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-02-24 11:55:06 +01:00
0b215bf7e0 use radfet enable pin now
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-02-24 11:47:32 +01:00
9f60c82725 intermediate PR
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-02-23 19:26:02 +01:00
7ae2d7117e deleted former file ,inc fix
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-02-23 19:12:41 +01:00
10e2600415 moved gps handler and deployment handler
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-02-23 19:08:12 +01:00
a067014116 Merge branch 'develop' into mueller/rad-sensor-update
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-02-23 19:03:08 +01:00
c83020d2c1 Merge pull request 'this fixes SCEX ping for RPi' (#147) from mueller/uart-test-task-update into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #147
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-02-23 18:49:39 +01:00
fd85ab3122 Merge pull request 'ctor fix for srv5' (#148) from mueller/srv5-ctor-fix into develop
Reviewed-on: #148
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-02-23 18:49:01 +01:00
2551e673d8 Merge pull request 'adaptions to updated fsfw' (#150) from mueller/pass-mq-args into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #150
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-02-23 18:48:16 +01:00
4ad3339331 Merge pull request 'moved and refactored sus handler' (#151) from mueller/sus-update into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #151
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-02-23 18:46:45 +01:00
b822ee77bc star tracker firmware update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-23 18:15:34 +01:00
d5b22ca636 small fix in obj factory
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-22 20:50:56 +01:00
f5c1263dd3 now it compiles
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-22 20:47:09 +01:00
ee53485d4e update dev conf 2022-02-22 20:44:23 +01:00
940115b588 fsfw update
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-22 20:38:28 +01:00
9c625a5743 cmakelists.txt fix
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-22 20:36:47 +01:00
e58c375cb9 moved and refactored sus handler
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-22 20:34:25 +01:00
d27a57ab28 adaptions to updated fsfw
Some checks failed
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-22 20:27:13 +01:00
bf9f40aad3 update rad sensor
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-02-22 20:20:14 +01:00
9387fdce1c ctor fix for srv5
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-22 20:17:15 +01:00
398277ca08 this fixes SCEX ping for RPi
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-22 20:13:16 +01:00
6c988ecf50 Merge pull request 'fixes for RPi build' (#146) from mueller/rpi-fixes into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #146
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-02-22 18:17:33 +01:00
3f35dbfad8 Merge pull request 'add max1227 module' (#145) from mueller/max1227-module into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #145
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-02-22 18:16:57 +01:00
b9e8346e82 Merge pull request 'watchdog updates' (#144) from mueller/watchdog-tweaks into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #144
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-02-22 18:16:12 +01:00
7a97471ed9 Merge pull request 'create unique bin name again' (#143) from mueller/create-unique-bin-name into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #143
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-02-22 18:15:11 +01:00
27ee6bfffc fixes for RPi build
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-22 13:50:46 +01:00
f5c525699e REAMDE fix
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-22 13:47:02 +01:00
7427d93c1d fix in config file
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-02-22 13:46:13 +01:00
63ec6d3eae add max1227 module
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-22 13:39:04 +01:00
56a57fadc8 update project file
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-22 13:37:26 +01:00
0f9690f6c2 watchdog updates
Some checks failed
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-22 13:35:12 +01:00
7c1dcb5f11 Merge branch 'develop' into mueller/create-unique-bin-name
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-21 14:46:56 +01:00
8394f6226a Merge pull request 'important bugfix for ADIS handler' (#141) from mueller/adis-hotfix into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #141
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-02-21 11:07:18 +01:00
9c7a203930 make unique name optional
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-02-21 10:41:22 +01:00
7d01aa463b Merge branch 'mohr/startracker' into meier/startracker 2022-02-21 10:04:15 +01:00
b10bf2c68d introduced bootloader and firmware submodes 2022-02-21 10:03:49 +01:00
23ba1a997d create unique bin name again
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-20 10:34:41 +01:00
8498a84354 important bugfix for ADIS handler
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-19 16:51:46 +01:00
c37e7022d1 argh
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-02-18 11:47:42 +01:00
15bab6ae33 c'mon...
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-02-18 11:44:05 +01:00
5bd613fb57 Merge branch 'mohr/automation' into mohr/catch2
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-02-18 11:39:15 +01:00
6a8c9e14e9 added libgps to docker to be able to build for linux 2022-02-18 11:39:03 +01:00
54e3b99708 enable unittests in Jenkinsfile 2022-02-18 11:38:23 +01:00
52e420b0be tweaked build of catch2
-only built when needed
-no more warnings as catch2 is compiled with default compiler flags
2022-02-18 11:37:32 +01:00
Uli
4704e6deb8 Merge branch 'mohr/automation' into mohr/catch2
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-17 18:37:11 +01:00
29efde6cbb what kind of language is this? 2022-02-17 18:37:00 +01:00
Uli
62531a710f Merge branch 'mohr/automation' into mohr/catch2
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-02-17 18:32:53 +01:00
57280167a2 Updated Dockerfile and Jenkinsfile 2022-02-17 18:31:21 +01:00
bcac56a65c reworked test setup
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-02-17 17:48:32 +01:00
4ea8ff9876 cleanup 2022-02-17 16:29:22 +01:00
090979e5a9 I like my debug output really pretty 2022-02-17 16:27:59 +01:00
334ba6d4bf continued work on event manager mock, slightly usable now 2022-02-17 15:49:39 +01:00
3400c538b3 added EventManagerMock, to be extended and moved into fsfw some day
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-02-16 18:15:06 +01:00
91e0e9f233 Merge branch 'develop' into mohr/startracker
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Conflicts:
	CMakeLists.txt
	cmake/PreProjectConfig.cmake
	linux/fsfwconfig/events/translateEvents.cpp
2022-02-16 15:21:24 +01:00
b722b15b26 changed target name for egse bsp 2022-02-16 15:06:02 +01:00
6ddd2e4759 Merge pull request 'minor gps fixes' (#139) from mueller/minor-gps-fixes into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #139
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-02-15 16:12:22 +01:00
208f417d17 minor gps fixes
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-15 17:03:34 +01:00
3a6dcdc78e Merge pull request 'Reworked cmake' (#136) from mohr/cmake into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #136
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2022-02-15 15:53:10 +01:00
583ab285d8 tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-14 16:53:01 +01:00
88a9f8f8de introduced current program check
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-02-14 16:42:04 +01:00
e95647c572 working on thermal controller unit test.
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-02-14 16:17:42 +01:00
7adff2c9a8 firmware update wip
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-02-14 11:28:15 +01:00
0f42790aa1 more mocking an such in unittests
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-02-11 17:49:28 +01:00
587e9451ea some more fsfw objects and stubs for unittesting 2022-02-11 16:20:26 +01:00
685b9cd1fb fixed conflicts 2022-02-11 15:09:45 +01:00
e3f36ddcfb tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-11 08:47:06 +01:00
b1973f77f7 integrated log level, log suscription and debug camera parameter setting in startup routine
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-02-11 08:24:35 +01:00
1e40013210 arcsec lib update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-02-11 07:34:55 +01:00
f1249392cf skeleton controller now unittested including fsfw. Still dirty WIP
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-02-10 18:54:09 +01:00
3c17ba5cc7 Merge branch 'meier/startrackeregse' of https://egit.irs.uni-stuttgart.de/eive/eive-obsw into meier/startrackeregse
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-02-10 18:39:50 +01:00
c9e5fbc361 all parameter requests implemented 2022-02-10 18:39:37 +01:00
f9721eb1ae unittesting a skeleton controller, still withouth fsfw 2022-02-10 18:29:28 +01:00
d9badee18f catch2 running 2022-02-10 18:15:33 +01:00
50cf01376f Merge branch 'develop' into mohr/cmake
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head Build queued...
2022-02-10 16:22:28 +01:00
e59a98f11c removed q7s/watchdog and q7s/simple configurations scripts, as there is no special configuration needed any more
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-02-10 15:28:12 +01:00
00042af77c updated README to cmake changes 2022-02-10 15:27:03 +01:00
ac49f3f72b Merge branch 'meier/startrackerRoofTest' into meier/startrackeregse 2022-02-10 11:47:50 +01:00
4d154b7cee reworked cmake, unfortunately a big one due to interdependence
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
- /mission is a library now, in preparation of unittests (which bring their own main)
- eive-simple is now only available in bsp=arm/q7s (but is still not compiling)
- watchdog and simple are their own executables, not configurations any more
- moved some q7s specific code into /bsp-q7s to flatten if-hierarchy in main CMakeLists.txt
- compiler and linker options are not globally applied to all targets
- linux is the default fsfw osal now, as current code does not compile on hosted
2022-02-09 21:38:56 +01:00
07e68bd05b param request wip 2022-02-09 19:46:12 +01:00
a65072b743 changed egse default config to ground 2022-02-09 19:27:08 +01:00
3035aea885 wip parameter requests 2022-02-09 19:20:19 +01:00
20f091d54e Merge pull request 'SCEX test code' (#135) from mueller/scex-test-code into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #135
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-02-09 14:24:49 +01:00
60d43246d4 link to egse sysroots
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-02-09 13:34:24 +01:00
7005314d4b apply clang-format
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-09 12:07:29 +01:00
0108a913e6 ping test working
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-02-08 17:23:02 +01:00
a3092e57e4 readme running obsw on egse
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-08 16:36:33 +01:00
cfce44ca3a change default name of json file 2022-02-08 16:01:06 +01:00
fb6b5b9e46 bugfixes for test code
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-02-08 15:58:17 +01:00
00eeeade3f some fixes for updates q7s-cp script
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-02-08 15:09:46 +01:00
acfd6bfd5e Merge remote-tracking branch 'origin/mueller/update-q7s-script' into mueller/scex-test
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-02-08 15:00:28 +01:00
1fa0e3f9c2 Merge remote-tracking branch 'origin/develop' into mueller/scex-test 2022-02-08 15:00:03 +01:00
90da51ed5a q7s-cp can now copy to flatsat as well
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-02-08 14:59:33 +01:00
328a3b2d02 define fix
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-08 13:11:54 +01:00
92eb403e35 egse define fiX
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-08 13:09:50 +01:00
c3e20d6a11 debugging
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-08 11:59:22 +01:00
4823496b58 fixed conflicts 2022-02-08 10:34:23 +01:00
0c086f9f15 Merge branch 'mueller/master' into mueller/scex-test
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-07 13:33:06 +01:00
632b8c7355 submodule updates
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-02-07 13:29:06 +01:00
470f0c05bf Merge branch 'mueller/master' into mueller/scex-test
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-07 11:58:18 +01:00
826cb13c3e update config.h.in
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-07 11:56:53 +01:00
191f3c3deb moved toolchain path print out
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-07 09:47:12 +01:00
21593a4696 fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-02-05 18:12:01 +01:00
e222be0534 added bsp_egse to clang format script 2022-02-05 18:09:55 +01:00
83d99a6662 run clang format script 2022-02-05 18:08:54 +01:00
68d56c4cd3 star tracker files moved to linux directory 2022-02-05 18:06:18 +01:00
27e3e446e9 clean up egse build 2022-02-05 17:45:28 +01:00
3c4033f83c update fsfw
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-02-05 17:19:28 +01:00
814f6caa43 cmake libgpiod define name changed 2022-02-05 17:19:00 +01:00
bb8ccd2842 fixed conflicts 2022-02-05 16:17:01 +01:00
abeb4cdbb1 arcsec lib update 2022-02-05 15:43:51 +01:00
b4d1046928 obsw configuration running on egse 2022-02-05 15:39:16 +01:00
19c97546b6 improved naming of tmtc bridge and tmtc polling task 2022-02-05 15:38:13 +01:00
e67bcd4e26 setup egse project 2022-02-05 13:19:20 +01:00
6543264691 manually preparing sysroots for cross compiling gpsd lib
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-05 11:43:40 +01:00
c42b3f56c3 applied clang-format
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-04 17:48:05 +01:00
a56b80ec55 tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-04 17:05:40 +01:00
18d018b7d7 firmware update wip
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-02-04 13:06:56 +01:00
6781b6debe Merge pull request 'BPX Handler and a lot more' (#133) from mueller/bpx-handler into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #133
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-02-04 13:02:18 +01:00
e1d506926f and another fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-03 17:37:37 +01:00
ec01edc535 fsfw update
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-03 17:34:25 +01:00
b8011717f7 fix which adds back descriptions
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-03 17:31:33 +01:00
5aa800af6e added back more events
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-02-03 17:14:28 +01:00
4000c35299 added back more events
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-03 17:10:11 +01:00
39471d8261 added back some events 2022-02-03 17:06:40 +01:00
2cdd192eeb fix decode error with imtq defintions
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-03 16:25:16 +01:00
339b8e8ecc tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-03 16:19:44 +01:00
9456dc1a00 applied auto-formatter
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-03 16:04:24 +01:00
3250a9f489 minor improvement, bugfix for reboot cmd
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-03 16:04:06 +01:00
a77d5f3669 tested cfg set request
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-03 15:31:18 +01:00
9bf3e46e3c tested some commands
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-03 15:03:35 +01:00
e142408bb8 bpx handler now working
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-03 13:37:48 +01:00
6440567585 update event list 2022-02-03 12:03:47 +01:00
344390da14 bugfixes 2022-02-03 12:02:25 +01:00
f47101c388 fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-03 11:13:54 +01:00
fea0b2bfe9 added debug printouts
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-02 17:53:07 +01:00
7d5b4325e2 add bpx handler in I2C PST
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-02 17:38:14 +01:00
988a5e6b31 battery handler not created
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-02 17:36:40 +01:00
0067cac94d created all pool entries for bpx handler
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-02 16:33:36 +01:00
89bbf98b4a continued BPX handler
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-02 16:07:28 +01:00
dd822f9c44 apply clang script
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-02 13:09:46 +01:00
d6e256a5d2 Merge branch 'mueller/master' into mueller/bpx-handler
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-02 13:09:23 +01:00
3bd5db2352 Merge branch 'mueller/master' of https://egit.irs.uni-stuttgart.de/eive/eive-obsw into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-02 12:18:30 +01:00
866450f1ae small fsfw fix 2022-02-02 12:18:22 +01:00
9d80e73925 fsfw update 2022-02-02 12:16:04 +01:00
0374262176 submodule update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-02 09:45:08 +01:00
9cdc67ad6c Merge remote-tracking branch 'origin/develop' into mueller/master 2022-02-02 09:43:58 +01:00
9d5345c5de Merge pull request 'meier/ptme' (#132) from meier/ptme into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #132
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2022-02-01 13:53:23 +01:00
d91ceb6fa7 idented preprocessor define
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-01 11:47:04 +01:00
4edbbf223c firmware update wip 2022-02-01 11:45:22 +01:00
4050521e5a added GNSS select pin
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-02-01 11:17:00 +01:00
bae1ea7c97 str helper progress print 2022-02-01 10:45:07 +01:00
1651926efa applied clanf formatting
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-01-31 08:09:58 +01:00
c1726f897b dynamic switching of cadu data sample time and clock manipulation
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-01-30 17:16:17 +01:00
ab4b397918 some fixed after blob set was removed 2022-01-29 12:42:40 +01:00
6043a827ed removed blob command 2022-01-29 12:27:26 +01:00
6be7cb4d0c some adaptions to new firmware
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-28 12:43:26 +01:00
e56c538518 Merge pull request 'I2C and IMTQ updates' (#131) from mueller/i2c-imtq-updates into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #131
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-01-28 07:36:18 +01:00
239e1f9f9f Merge pull request 'GPS Update' (#130) from mueller/gps-update into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #130
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-01-28 07:33:36 +01:00
3bd4c57b85 replaced all names
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-27 18:32:54 +01:00
b1e716788a renamed GPS controller
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-27 18:29:31 +01:00
0a315f203b renamed some deivces
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-27 18:29:14 +01:00
8ee3e18327 updatre q7s-cp utility
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-27 17:30:28 +01:00
0b9b24ca08 try new symlink for eive-i2c
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-27 17:06:21 +01:00
9231f47641 tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-27 16:39:47 +01:00
ef48c8c6ad correction for i2c device
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-27 16:08:53 +01:00
3207d25bd3 weird errors when going to normal mode
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-27 16:04:45 +01:00
c6f7281bc4 still need config include
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-27 15:37:48 +01:00
521b47d9fc decoupled IMTQ handler from OBSWConfig.h
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-27 15:29:58 +01:00
26d66d2a36 issues with IMTQ
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-27 15:26:07 +01:00
a9c93db790 updated tmtc, IMTQ switch cmd added
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-27 15:06:36 +01:00
b4505e5305 update project file
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-27 12:06:09 +01:00
e8cd2207cf repoint fsfw
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-26 18:04:28 +01:00
5c535784e9 added back old GPS handler
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-26 17:59:31 +01:00
bf73a2e442 increased the stack size for the GPS controller
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-26 17:52:28 +01:00
9998b54f89 hyperion handler working now
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-26 16:35:42 +01:00
604424c7ed Merge remote-tracking branch 'origin/develop' into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-26 16:00:22 +01:00
71ada855c7 Merge pull request 'meier/ptme' (#129) from meier/ptme into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #129
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2022-01-26 15:59:10 +01:00
49bbfb7b7d submodule updates
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-26 15:51:15 +01:00
90b65d4d8a update fsfw
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-01-25 19:47:34 +01:00
8ad2114d4b fsfw update
Some checks failed
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-01-25 19:07:48 +01:00
03707f2d6a removed unsued code
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-25 19:05:42 +01:00
102385a707 introduced axi configuration interface for ptme ip core
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-25 18:55:52 +01:00
38a1b496e7 papb interface no longer a system object 2022-01-25 14:33:06 +01:00
93e84fde29 initialize map num 2022-01-25 14:00:30 +01:00
7a57043df8 tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-24 17:09:57 +01:00
a07468f7b7 introduced uio mapper class 2022-01-24 16:33:22 +01:00
512d339803 clang formatter setup eclipse
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-24 15:38:00 +01:00
a56224c339 ptme axi interface
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-24 07:43:14 +01:00
34a4904738 Merge remote-tracking branch 'origin/develop' into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-21 14:07:53 +01:00
745526ce8a Merge pull request 'PCDU switch callback' (#128) from mueller/pcdu-switch-callback into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #128
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-01-19 19:46:56 +01:00
b1667770fe Merge branch 'mueller/pcdu-switch-callback' into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-19 18:51:58 +01:00
ded92fdf7a call param callback twice
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-19 18:51:44 +01:00
7f4f241841 Merge pull request 'flipped preproc defines' (#127) from flipped-tmtctest-preproc-define into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #127
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-01-19 18:44:34 +01:00
b3ca5ac6f2 Merge remote-tracking branch 'origin/mueller/pcdu-switch-callback' into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-19 18:42:54 +01:00
c35c94f22b Merge branch 'mueller/master' into mueller/bpx-handler
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-19 18:28:38 +01:00
c9787f8e47 Merge remote-tracking branch 'origin/develop' into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-19 18:27:37 +01:00
4913ffa6d4 removed unrelated changes
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-01-19 18:21:17 +01:00
262837bf0b Merge remote-tracking branch 'origin/develop' into mueller/pcdu-switch-callback
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-19 18:18:41 +01:00
68eb7c9271 removed clang script in root
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-19 18:11:35 +01:00
c88371b37a Merge remote-tracking branch 'origin/develop' into flipped-tmtctest-preproc-define
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-19 18:10:12 +01:00
328b9d95af Merge pull request 'clang formatting applied' (#126) from mueller/clang-formatting-applied into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #126
2022-01-19 18:05:36 +01:00
1eb6017a9d callback working
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-19 18:05:17 +01:00
79fac2adcb callbacks are now allowed
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-19 17:17:06 +01:00
f948905aa2 implemented first switch callback
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-19 17:10:51 +01:00
947134bfd1 reordered
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-01-19 14:39:39 +01:00
32236f9864 and another name
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-01-19 14:34:20 +01:00
eb23dc1b0f better names
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-01-19 14:29:03 +01:00
5bd4f56bc6 flipped preproc defines
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-01-19 14:17:55 +01:00
dc6a2ffe56 minor ADIS updates
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-19 14:08:30 +01:00
a74ce78c6f Merge remote-tracking branch 'origin/develop' into mueller/clang-formatting-applied
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-01-19 13:13:30 +01:00
df3b729baa Merge pull request 'clang formatting' (#124) from mueller/clang-formatting into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #124
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-01-19 12:55:19 +01:00
a50f852b9d Merge remote-tracking branch 'origin/develop' into mueller/clang-formatting-applied
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-01-19 11:52:06 +01:00
cf92707ee3 Merge pull request 'meier/startracker' (#125) from meier/startracker into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #125
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2022-01-19 11:50:53 +01:00
77d8f2fc54 Merge remote-tracking branch 'origin/develop' into mueller/clang-formatting-applied
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-01-19 11:49:51 +01:00
f49e5fbd5f Merge remote-tracking branch 'origin/develop' into mueller/clang-formatting
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-19 11:49:23 +01:00
2f153fe23c Merge remote-tracking branch 'origin/develop' into meier/startracker
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-19 11:48:41 +01:00
4a20306a83 cleanDocker
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-19 11:47:53 +01:00
29b795252e cleanDocker
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-01-19 11:46:38 +01:00
bb2f5bbb03 cleanDocker
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-01-19 11:45:56 +01:00
bd7958f6c5 cleanDocker
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-01-19 11:28:37 +01:00
890d28fb7f removed dummy change
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-01-19 11:16:57 +01:00
0724215b6a change dockerfile to trigger container rebuild 2022-01-19 11:16:42 +01:00
3ab6494c28 fsfw update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-01-18 18:09:40 +01:00
50e17bc160 disabled acs task, crashes..
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-01-18 14:20:18 +01:00
c1e04b286e added missing pool entries
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-18 11:51:14 +01:00
2fe645375c assign dataset
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-01-18 11:47:29 +01:00
d4bb5e3f18 Merge branch 'mueller/master' into mueller/gps-tests
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-01-18 11:45:34 +01:00
c9fe3294ac Merge remote-tracking branch 'origin/develop' into mueller/master
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-01-18 11:44:19 +01:00
5cc7331e90 applied clang formatting
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-01-18 11:41:19 +01:00
76adea6bd5 fsfw update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-01-18 11:39:03 +01:00
0ed4691113 readme update 2022-01-18 11:38:52 +01:00
c32ca422fc updated shell script helpers 2022-01-18 11:37:15 +01:00
a85800d86c Merge branch 'mueller/master' of https://egit.irs.uni-stuttgart.de/eive/eive-obsw into mueller/master 2022-01-18 10:48:00 +01:00
d5a09dc280 added cfg HK
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-17 17:11:27 +01:00
fab259a2b5 added BPX HK set
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-01-17 16:44:20 +01:00
1d6f999ab6 added HK deserializer 2022-01-17 16:21:33 +01:00
77c45c0de9 applied formatting
Some checks failed
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-01-17 15:58:27 +01:00
975b3cd294 added clang script and forward declarations
Some checks failed
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-01-17 15:57:52 +01:00
870dd717e4 tmtc update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-01-17 15:48:13 +01:00
7138d29041 Merge pull request 'GPS Refactoring' (#123) from mueller/gps-tests into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #123
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-01-17 15:42:04 +01:00
c657264832 small fix
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-17 15:41:22 +01:00
ce6c9d4613 Merge remote-tracking branch 'origin/develop' into mueller/gps-tests
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-01-17 15:38:44 +01:00
a9cd072acd add battery definitions file
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-01-17 15:36:52 +01:00
643584e1c5 rerun generator scripts
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-17 15:36:37 +01:00
3a274e7a9b apply clang format
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-01-17 15:35:46 +01:00
5a210e19e1 request limits, camera and blob parameters
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-17 15:28:53 +01:00
384122f811 started BPX handler
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-01-17 15:03:46 +01:00
71c5aa4df0 added missing include
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-01-17 13:51:03 +01:00
9438ba8dcc forward declaration fixes 2022-01-17 13:50:24 +01:00
e6d8d24cd5 applied clang formatting
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-01-17 13:48:55 +01:00
41ad4099e3 Merge pull request 'meier/syrlinks' (#122) from meier/syrlinks into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #122
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2022-01-17 13:18:49 +01:00
abfc120633 command to request camera parameters 2022-01-17 13:15:18 +01:00
0d03f66e9d moved clang format script
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-01-17 13:14:14 +01:00
2207d06058 added .clang format script
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-01-17 13:12:33 +01:00
969251d9fa new ACS ctrl task
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-01-17 11:38:21 +01:00
37ae508af5 finished GPS handler refactoring
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-01-17 11:31:50 +01:00
952dfde5b7 bug fixes in star tracker handler
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-17 08:40:56 +01:00
858fd07c4a Merge branch 'mueller/master' into mueller/gps-tests
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-01-15 13:52:12 +01:00
3b9959b8b3 removed gps from pst
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-01-15 13:51:27 +01:00
70ab486081 removed GPS flags 2022-01-15 13:50:21 +01:00
2fa8de4103 tmtc update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-01-15 13:39:49 +01:00
1aa8befe50 tmtc update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-01-15 13:21:46 +01:00
9b0906c068 repoint fsfw
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-01-15 13:19:21 +01:00
806280ee4a fsfw update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-01-15 13:18:52 +01:00
a706f6d9bd using test booleans
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-01-15 13:09:33 +01:00
e73dc2f191 gps test worked
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-01-15 13:05:11 +01:00
3421c6fcbf adapted to develop
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-14 10:20:21 +01:00
e1ddd19e31 crc fixes in syrlinks register write commands
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-14 10:16:03 +01:00
a9824b71b7 tmtc update 2022-01-14 10:14:45 +01:00
d0807ed262 Merge branch 'develop' of https://egit.irs.uni-stuttgart.de/eive/eive-obsw into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-13 14:02:51 +01:00
2323fd0506 added rpi port script
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-11 14:50:39 +01:00
9d48438fae fixes for RPi
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-11 14:45:16 +01:00
64ac41d1fe initialize variable
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-11 11:04:23 +01:00
d8ec051e13 stuff
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-11 10:55:26 +01:00
1f5553b571 convert gps handler base class
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
- Is ExtendedControllerBase now
2022-01-11 10:16:26 +01:00
372dca87ad Merge remote-tracking branch 'origin/develop' into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-10 14:04:04 +01:00
2e0d747a0d Merge branch 'mueller/master' of https://egit.irs.uni-stuttgart.de/eive/eive-obsw into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-10 14:03:12 +01:00
7201fdf152 justfile update 2022-01-10 14:02:58 +01:00
1bed87bc20 README update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-10 10:07:19 +01:00
470e834b80 Merge pull request 'meier/startracker' (#120) from meier/startracker into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #120
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2022-01-10 09:38:42 +01:00
17615a5a2d Merge branch 'develop' into meier/startracker
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-10 09:26:51 +01:00
1f7ff062c1 performing remote reset of Q7S
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-07 08:12:41 +01:00
f6a0fcbe0b merged develop
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-01-03 08:07:47 +01:00
09db06e8b2 Merge pull request 'GNSS Update' (#121) from mueller/gnss-update into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #121
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-01-03 08:00:15 +01:00
24ee4cb7f5 tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-02 10:39:40 +01:00
7a28cba71b Merge branch 'mueller/master' into mueller/gnss-update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-02 10:38:22 +01:00
20f4baa84f Merge remote-tracking branch 'origin/develop' into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2022-01-02 10:35:19 +01:00
7e0510115a adapted uart device files
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-01-01 15:53:44 +01:00
b59abb55fe fixed device file number for mpsoc uart 2022-01-01 15:35:08 +01:00
8b8a1554a5 header fix issue with case sensitivity
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-01-01 11:25:00 +01:00
3bbc7820c8 tmtc update
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-01-01 11:19:19 +01:00
1aca0b4499 typo 2022-01-01 11:16:11 +01:00
ac51ad7a4f some improvements
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2021-12-30 13:31:34 +01:00
29e7ac210a upload fpga image command
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2021-12-30 12:52:08 +01:00
3833b7a875 tmtc update
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2021-12-29 20:34:12 +01:00
e26ffb6afd fpga download image command
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2021-12-29 20:33:20 +01:00
8d160572c7 tmtc update
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2021-12-24 07:51:13 +01:00
2ea75d2a05 erase command
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-12-24 07:31:21 +01:00
14dec1d700 checksum command
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-12-23 18:33:31 +01:00
fa8cdb3241 changed star tracker uart 2021-12-23 18:33:06 +01:00
8cddbf86d9 flash read command
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-12-23 11:07:19 +01:00
76f840f137 Merge branch 'develop' into meier/startracker 2021-12-22 16:06:59 +01:00
1331c9e7e9 flash read request 2021-12-22 16:06:30 +01:00
cdddc76a59 tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-12-22 15:28:28 +01:00
27c011413a fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-12-22 15:26:32 +01:00
940c770b44 Merge remote-tracking branch 'origin/develop' into mueller/master
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-12-22 15:25:06 +01:00
db82350d53 Merge pull request 'meier/startracker' (#118) from meier/startracker into develop
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Reviewed-on: #118
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2021-12-22 15:22:58 +01:00
8a104c4af2 Merge branch 'meier/startrackerFlashread' into meier/startracker 2021-12-22 11:25:22 +01:00
c31ae5073b fixed header name
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-12-22 11:20:05 +01:00
72cc081098 fixed header names
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2021-12-22 11:17:50 +01:00
38ad9f0da2 flash read wip 2021-12-22 11:14:27 +01:00
d12027126c arcsec lib update
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2021-12-21 20:52:45 +01:00
433b218227 added new GNSS mux select pin
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-12-21 18:29:27 +01:00
433947824a removed spi mux switching, not necessary anymore
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-12-21 18:28:46 +01:00
861d92f3c2 update uart device names
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-12-21 18:13:20 +01:00
1b38d34951 tmtc update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2021-12-21 17:40:31 +01:00
421866b739 str write command fix
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-12-21 17:28:24 +01:00
337a485fc1 rerun generators 2021-12-21 17:27:23 +01:00
bed70c6fb5 Merge branch 'develop' into meier/startracker 2021-12-21 15:46:35 +01:00
36d33711a7 flash write command 2021-12-21 15:46:09 +01:00
636c1fdf26 added GNSS enable pin handling
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-12-20 13:37:28 +01:00
e3841d180e merged develop 2021-12-19 12:15:18 +01:00
8694a20c63 tmtc update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-12-19 11:35:55 +01:00
428d2562ac Merge branch 'meier/startrackerActions' into meier/startracker 2021-12-19 11:29:58 +01:00
72c0503ac1 changed deserialization method for star tracker datasets 2021-12-19 11:29:40 +01:00
654e75fec8 histogram tm disabled validity buffer for deserialization 2021-12-18 11:33:29 +01:00
3163995d06 improvements of printout 2021-12-17 15:24:23 +01:00
2dd8fb4f45 acu command to print current and voltage of ACU channels
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-12-17 15:08:33 +01:00
79859090f8 Merge pull request 'ACS & TCS Board and Reaction Wheels working together now' (#117) from mueller/acs-tcs-rwheel-working-together into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #117
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-12-17 14:48:41 +01:00
ffa8a37b04 Merge remote-tracking branch 'origin/develop' into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-12-17 14:43:02 +01:00
e442a8c968 ACS and TCS board working together now
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-12-17 14:20:22 +01:00
2ed0bdf132 acu print stats 2021-12-17 10:45:55 +01:00
6346da658a update submodules
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-12-16 19:48:08 +01:00
4dee8658fd histogram and contrast telemetry set 2021-12-15 19:32:43 +01:00
50154c944a fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-12-15 13:27:01 +01:00
1bd1e25629 Merge pull request 'MAX31865 clear fault byte' (#116) from mueller/max31865-clear-fault-bit into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #116
2021-12-15 12:08:13 +01:00
64ab445f4e initialize values
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-12-15 11:55:47 +01:00
481756b014 fix script, experiment with timing 2021-12-15 11:49:50 +01:00
a3b6c7e8c8 Merge branch 'develop' into mueller/max31865-clear-fault-bit
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-12-15 11:23:53 +01:00
5a0563a7e8 reverted pst freq
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-12-15 11:23:20 +01:00
9e6ad8807a clear fault bit for max31865 devies
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-12-15 11:20:28 +01:00
5ae6a61ec0 fixes for gyro adis handler
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-12-15 10:15:06 +01:00
774ffa8359 update fsfw and tmtc
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-12-15 10:02:44 +01:00
5067519b8a fixed merge conflicts 2021-12-14 19:57:35 +01:00
58074f9bfd tmtc update 2021-12-14 19:33:26 +01:00
717f2e21a0 star tracker improvements 2021-12-14 19:24:31 +01:00
74f52632f6 increased frequency of pst tasks 2021-12-14 19:23:47 +01:00
9983acf98b Merge pull request 'Update EIVE OBSW' (#114) from mueller/update-sw into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #114
2021-12-14 18:36:32 +01:00
1f6dbd181c moved heater handler
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-12-14 17:38:23 +01:00
5fadb8f86d moved heater handler
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-12-14 17:35:21 +01:00
985ef0f6bc wrong object ID
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-12-14 17:18:31 +01:00
86581d81c9 interpretation of empty value strings in json
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-12-13 09:40:37 +01:00
9c42b861f4 timestamp for file creation
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-12-11 11:56:47 +01:00
af32941352 ADIS device handler can now handle multiple types
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
- Added handling for ADIS16507 and ADIS16505 type
2021-12-10 17:46:52 +01:00
f9581f3100 command to reset error signal 2021-12-10 10:07:23 +01:00
1895d7c3db fix in image upload function 2021-12-09 15:02:58 +01:00
e64a3fb645 rerun generators 2021-12-09 15:02:30 +01:00
54e5fef8fd update to updated fsfw
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-12-09 13:43:28 +01:00
52d8ae5ffb compiling for windows again
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-12-08 17:23:35 +01:00
11704ea908 enabled ACS board A side
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-12-08 14:48:29 +01:00
99c450933e fix in validation command
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-12-08 14:39:25 +01:00
b691a1e75d parsing of arcsec json file complete 2021-12-08 12:50:55 +01:00
58c40695ae star tracker commands, tracking, mounting, camera, blob 2021-12-07 16:30:17 +01:00
fac6996a15 star tracker limits setting 2021-12-06 19:36:21 +01:00
ed8399ef9a Merge branch 'meier/syrlinks' into meier/StarTracker 2021-12-02 13:55:03 +01:00
7cc0fc640f pdec monitor register
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-12-02 11:51:22 +01:00
5c1c0dc515 Merge branch 'develop' of https://egit.irs.uni-stuttgart.de/eive/eive-obsw into develop 2021-12-02 09:34:47 +01:00
a7ab2bb93a str img loader wip 2021-12-02 08:05:33 +01:00
a2b9484db3 Merge pull request 'SW Update' (#113) from mueller/utility-updates into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #113
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-12-01 09:08:00 +01:00
77f6ac57e9 some reaction wheel fixes
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-11-30 16:45:33 +01:00
8c649b3e70 str image loader wip 2021-11-30 16:01:02 +01:00
d287aa80c1 increase max number of stored packets in tmtcbridge
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-11-30 14:54:10 +01:00
8d284b3d2a using warning insted of debug
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-11-30 14:41:42 +01:00
667bbc918f make some debug output optional 2021-11-30 14:40:35 +01:00
ac3790b659 Merge remote-tracking branch 'origin/develop' into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-11-30 14:03:15 +01:00
1affc1e1d3 str image helper, step failure handling 2021-11-29 15:02:14 +01:00
077913400f star tracker image helper 2021-11-29 11:04:56 +01:00
b84bdcc0fc moved print set of temperature set and time set to dataset class 2021-11-28 09:57:14 +01:00
5ea129d252 star tracker solution telemetry 2021-11-27 19:40:52 +01:00
eb0e9c2a41 request version command 2021-11-26 15:24:52 +01:00
8b97528afb star tracker ping and reboot command 2021-11-26 13:16:05 +01:00
007126feff Merge branch 'develop' into meier/StarTracker 2021-11-26 09:15:38 +01:00
0b7e8fa38b star tracker ping command 2021-11-26 09:14:41 +01:00
25b53d55ce Merge pull request 'SW tweaks' (#112) from mueller/sw-tweaks into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #112
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-11-26 09:14:02 +01:00
5b412bf072 implemented rename function
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-11-25 21:38:13 +01:00
0f89282dae event name correction
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-11-25 14:20:53 +01:00
14ba11738b adapted event name 2021-11-25 14:09:06 +01:00
fa89da4438 update event list
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-11-25 14:07:05 +01:00
be75332be7 update event list
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-11-25 14:03:21 +01:00
1886c69e0b Merge remote-tracking branch 'origin/develop' into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-11-25 13:55:40 +01:00
23d9f56308 star tracker startup immediately 2021-11-25 08:24:24 +01:00
1be7208f47 tmtc and fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-11-24 18:58:34 +01:00
395fbb7704 Merge pull request 'meier/txRateSetting' (#111) from meier/txRateSetting into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #111
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2021-11-24 18:47:04 +01:00
b4479d6a7d ccsds handler class id
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-11-24 18:29:34 +01:00
34897aceae tmtc update 2021-11-24 18:29:14 +01:00
542aa994b7 link state now detected by bit and carrier lock flags 2021-11-24 15:55:25 +01:00
345ccf5392 transmit enable and timeout 2021-11-22 18:01:16 +01:00
ec7568337c object parser 2021-11-22 17:58:24 +01:00
c2dbebe56b gen events 2021-11-22 17:57:33 +01:00
cb6db97fc1 run object parser 2021-11-22 17:56:46 +01:00
15b2f9a13e run event parser 2021-11-22 17:55:40 +01:00
283921cba1 print clcw command 2021-11-22 10:38:32 +01:00
dc0f435dbd bit rate setter 2021-11-21 18:07:05 +01:00
63965e2f68 enabled rx lines of syrlinks rs485 transceiver chips 2021-11-21 13:59:18 +01:00
67ac4060d7 physical ram base adress for q7s 2021-11-21 13:58:05 +01:00
4a01ff3537 fsfw and tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-11-19 16:55:17 +01:00
c1be4a1e83 changes for updated fsfw
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-11-19 13:22:20 +01:00
9ec653075d Merge pull request 'meier/pdec' (#110) from meier/pdec into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #110
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2021-11-19 12:49:37 +01:00
a2d5f872ad fsfw and tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-11-18 18:54:00 +01:00
8891cda1d4 Merge branch 'meier/pdec' of https://egit.irs.uni-stuttgart.de/eive/eive-obsw into meier/pdec
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-11-17 11:27:46 +01:00
9e9a19ebb0 changed ptme uio on te0720 2021-11-17 11:27:29 +01:00
0f3e9de2b0 Merge branch 'develop' into meier/pdec
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-11-09 23:01:20 +01:00
f75e7b2002 adaptions to q7s design
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-11-08 12:25:12 +01:00
08b369f667 fix in pdec tc reading
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-11-06 20:28:33 +01:00
6f85968f3c clcw readout
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-11-03 19:49:41 +01:00
709661ff67 pdec handler print tc
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-11-03 18:19:36 +01:00
c7cd4afa01 Merge pull request 'meier/rtdDebug' (#109) from meier/rtdDebug into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #109
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2021-11-03 14:56:19 +01:00
3e2f4e7a10 class to generate pdec config words 2021-11-02 11:11:38 +01:00
9191d1ec33 save before changing configuration writing 2021-11-01 18:11:29 +01:00
556a3986c1 pdec handler 2021-11-01 12:41:20 +01:00
b71ac25a77 changed spi of of RTDs
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-10-29 19:15:14 +02:00
ca8e3f685a improved chip select decoding 2021-10-29 19:13:48 +02:00
017e02e513 changes applied during flatsat debugging
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-10-29 19:11:46 +02:00
46dcc18ddb updated constants
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-10-18 18:23:26 +02:00
9ddea586ea updated build scripts
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-10-18 18:15:39 +02:00
f8d5546a03 rw spi callback removed wrong continue 2021-10-14 15:50:50 +02:00
b7cd192185 Merge pull request 'Updates for OBSW' (#107) from mueller/max31685-bugfix into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #107
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-10-13 17:08:28 +02:00
9f681275b4 Merge branch 'develop' into mueller/max31685-bugfix
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-10-13 15:56:57 +02:00
dac3068437 updated object translations
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
2021-10-13 15:54:30 +02:00
c56fc09da7 fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-10-13 15:52:22 +02:00
0237a22ae9 using old names again
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-10-13 15:42:55 +02:00
ccb3a23602 tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-10-13 13:20:03 +02:00
30cf0c7aad ADIS devices working now
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-10-12 18:34:04 +02:00
dcdf0c9843 updated object translation file
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-10-12 18:03:00 +02:00
7c673d6e7f bugfixes in max31685, indexing adapted
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-10-12 17:55:36 +02:00
667a893d01 fsfw update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-10-11 20:06:18 +02:00
01e9ef64c9 moved command executor 2021-10-11 20:05:59 +02:00
5e42618dfd removed references to removed module
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-10-11 19:44:58 +02:00
1bef032260 unittests were refactored
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-10-11 19:43:44 +02:00
221012f790 hosted build compiling again
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-10-11 19:34:34 +02:00
8d10dcbe18 tmtc update 2021-10-11 17:09:04 +02:00
c51d9b437e Merge branch 'mueller/master' of https://egit.irs.uni-stuttgart.de/eive/eive-obsw into mueller/master 2021-10-11 17:08:33 +02:00
c85a7d6b9c fsfw and tmtc update 2021-10-11 17:08:24 +02:00
8a6b4a14bd Merge pull request 'Minor updates for README' (#106) from mueller/readme-tweaks into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #106
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-10-11 11:22:11 +02:00
2e0606ff0c README update
Some checks are pending
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop Build started...
2021-10-11 11:13:02 +02:00
f3f96e02a2 another minor update
Some checks are pending
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop Build started...
2021-10-11 11:10:30 +02:00
7d6022ab09 another helpful command added
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-10-11 11:09:53 +02:00
10f2a7a7b7 more information about systemd service
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-10-11 11:06:12 +02:00
271d133053 updated comment
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-10-11 10:47:52 +02:00
65ed862c9b Merge remote-tracking branch 'origin/develop' into mueller/master
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-10-11 10:45:25 +02:00
1f981e7a60 tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-10-11 10:25:40 +02:00
823decde5c Merge pull request 'meier/ptme' (#104) from meier/ptme into develop
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Reviewed-on: #104
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2021-10-11 10:23:12 +02:00
2b609a413d readme update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-10-08 14:39:53 +02:00
5da2a45881 gpios to enable rs485 tx clock and tx data
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-10-08 14:15:33 +02:00
c5c7a895a4 fixed merge conflicts 2021-10-08 11:40:46 +02:00
18f7d3e3c9 tm now sent over PTME 2021-10-07 17:23:41 +02:00
bea4b7629b Merge pull request 'Added Unittests' (#103) from mueller/added-unittests into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #103
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-10-07 17:22:24 +02:00
1463bcae52 update fsfw and tmtc
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-10-07 10:14:35 +02:00
a2a6bf1b45 tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-10-06 18:02:05 +02:00
448ca372a9 fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-10-05 13:49:10 +02:00
350e494930 update tmtc
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-10-05 12:23:59 +02:00
47733a5648 fsfw and tmtc update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-10-05 01:28:20 +02:00
7f70673625 Merge branch 'develop' into meier/ptme
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-10-04 15:07:58 +02:00
7ae02d43a7 added preprocessor defines to exclude CCSDS Handler 2021-10-04 14:47:32 +02:00
82b72e66ee tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-10-04 11:37:54 +02:00
3ca18a42ad live tm variable
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-30 09:34:01 +02:00
55d31d0dc2 ccsds handler
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-29 14:47:20 +02:00
0499fd03da tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-29 12:31:22 +02:00
8e23be665b updated README
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-29 11:02:41 +02:00
825682c36d unittests working
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-29 10:59:37 +02:00
f61d0e83f0 refactoring for added unittests 2021-09-29 10:52:36 +02:00
e4286d18d4 only use unique name for EIVE OBSW 2021-09-29 09:37:29 +02:00
ababb5c062 adding unittests for EIVE
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-29 09:30:58 +02:00
74fa4835e2 added Catch2 repo
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-29 09:15:02 +02:00
cf04b83cdf EIVE prefixes added 2021-09-29 09:14:17 +02:00
c1fe5325ed renaming options 2021-09-29 09:12:57 +02:00
5b6f091859 function in namespace now
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-28 17:43:18 +02:00
d903df55ce fsfw update 2021-09-28 17:43:02 +02:00
6a00fd3099 fsfw update and call fix
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-28 17:41:02 +02:00
4db5944514 fsfw update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-09-28 16:46:07 +02:00
699ffd75df fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-28 15:33:46 +02:00
14dcd9eb5f fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-28 15:13:05 +02:00
e5d0dac65e tcpip components refactoring
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-28 14:58:12 +02:00
8acb0c3c02 fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-28 11:34:43 +02:00
55a274a6e3 fsfw and tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-28 10:59:09 +02:00
90bd6b1fc1 Merge pull request 'Update FSFW and minor improvements' (#102) from mueller/update-gpio into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #102
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-09-27 15:25:40 +02:00
2fd4687108 fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-27 11:20:00 +02:00
3af5b8560d have to user proper types now
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-27 10:51:47 +02:00
a5f9d0c0d5 fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-27 10:09:38 +02:00
7fd5b6b39e Merge remote-tracking branch 'origin/develop' into mueller/master
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-09-27 10:07:29 +02:00
71bf98794d Merge remote-tracking branch 'origin/develop' into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-27 10:07:06 +02:00
3e5ef61d5f Merge pull request 'meier/openGpioByName' (#101) from meier/openGpioByName into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #101
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2021-09-27 10:01:20 +02:00
3a606fdfc4 Merge remote-tracking branch 'origin/develop' into meier/openGpioByName
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-09-27 09:59:36 +02:00
04d791824d class IDs and subsystem IDs moved to framework
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-26 22:46:10 +02:00
5b26564058 ptme ip core packet insertion 2021-09-26 08:29:30 +02:00
8dd58ed4fe fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-25 16:42:58 +02:00
c0dde1a005 define renamed
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-25 16:38:39 +02:00
773627dc3d fixed merge conflicts 2021-09-25 11:57:33 +02:00
f0885fcb2e removed unused gpio definitions in busConf.h
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-09-25 11:09:29 +02:00
9fd4c477f0 changed all gpio configurations to open by line name
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-25 10:49:03 +02:00
11537f9988 mgm 2 lis3 chip select opened by name 2021-09-24 09:42:20 +02:00
5348f059b0 fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-23 17:34:45 +02:00
0e43969b63 dont start empty PST
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-23 17:34:01 +02:00
ebb575d490 updated subversion
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-23 17:22:30 +02:00
d6164971df Merge branch 'develop' into meier/openGpioByName 2021-09-23 17:14:12 +02:00
0e68dbd86c open mgm 2 lis3 chip select by name 2021-09-23 17:13:17 +02:00
c035a26051 gpio open by line name test on te0720 2021-09-23 10:51:47 +02:00
d54e2276d6 ccsds handler wip 2021-09-22 16:54:55 +02:00
e2c26efe4a Merge branch 'meier/gpioNaming' into meier/ptme 2021-09-20 19:11:22 +02:00
ddd8ff2180 ptme handling wip 2021-09-19 12:27:48 +02:00
397 changed files with 39960 additions and 25305 deletions

8
.clang-format Normal file
View File

@ -0,0 +1,8 @@
---
BasedOnStyle: Google
IndentWidth: 2
---
Language: Cpp
ColumnLimit: 100
ReflowComments: true
---

3
.gitignore vendored
View File

@ -8,6 +8,9 @@
!misc/eclipse/**/.cproject
!misc/eclipse/**/.project
#vscode
/.vscode
# Python
__pycache__
.idea

View File

@ -13,34 +13,32 @@ cmake_minimum_required(VERSION 3.13)
set(CMAKE_SCRIPT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
if(TGT_BSP MATCHES "arm/q7s")
option(EIVE_BUILD_WATCHDOG "Compile the OBSW watchdog insted" OFF)
option(BUILD_Q7S_SIMPLE_MODE OFF "Simple mode with a minimal main function")
endif()
option(ADD_ETL_LIB "Add ETL library" ON)
option(ADD_JSON_LIB "Add JSON library" ON)
option(EIVE_ADD_ETL_LIB "Add ETL library" ON)
option(EIVE_ADD_JSON_LIB "Add JSON library" ON)
option(EIVE_SYSROOT_MAGIC "Perform sysroot magic which might not be necessary" OFF)
option(EIVE_CREATE_UNIQUE_OBSW_BIN "Append username to generated binary name" ON)
if(NOT FSFW_OSAL)
set(FSFW_OSAL host CACHE STRING "OS for the FSFW.")
set(FSFW_OSAL linux CACHE STRING "OS for the FSFW.")
endif()
if(TGT_BSP)
if(TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/beagleboneblack")
option(LINUX_CROSS_COMPILE ON)
option(EIVE_BUILD_GPSD_GPS_HANDLER "Build GPSD dependent GPS Handler" OFF)
elseif(TGT_BSP MATCHES "arm/q7s")
option(EIVE_BUILD_GPSD_GPS_HANDLER "Build GPSD dependent GPS Handler" ON)
endif()
endif()
# Perform steps like loading toolchain files where applicable.
include(${CMAKE_SCRIPT_PATH}/PreProjectConfig.cmake)
pre_project_config()
set(PROJECT_NAME_TO_SET eive-obsw-$ENV{USERNAME})
if(EIVE_BUILD_WATCHDOG)
set(PROJECT_NAME_TO_SET eive-watchdog)
endif()
# Project Name
project(${PROJECT_NAME_TO_SET} ASM C CXX)
project(eive-obsw ASM C CXX)
################################################################################
# Pre-Sources preparation
@ -51,34 +49,42 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# Set names and variables
set(TARGET_NAME ${CMAKE_PROJECT_NAME})
set(OBSW_NAME ${CMAKE_PROJECT_NAME})
set(WATCHDOG_NAME eive-watchdog)
set(SIMPLE_OBSW_NAME eive-simple)
set(UNITTEST_NAME eive-unittest)
set(LIB_FSFW_NAME fsfw)
set(LIB_EIVE_MISSION eive-mission)
set(LIB_ETL_NAME etl)
set(LIB_CSP_NAME libcsp)
set(LIB_LWGPS_NAME lwgps)
set(LIB_ARCSEC wire)
set(THIRD_PARTY_FOLDER thirdparty)
set(LIB_CXX_FS -lstdc++fs)
set(LIB_CATCH2 Catch2)
set(LIB_GPS gps)
set(LIB_JSON_NAME nlohmann_json::nlohmann_json)
# Set path names
set(FSFW_PATH fsfw)
set(MISSION_PATH mission)
set(TEST_PATH test/testtasks)
set(UNITTEST_PATH unittest)
set(LINUX_PATH linux)
set(COMMON_PATH common)
set(WATCHDOG_PATH watchdog)
set(COMMON_CONFIG_PATH ${COMMON_PATH}/config)
set(UNITTEST_CFG_PATH ${UNITTEST_PATH}/testcfg)
set(FSFW_HAL_LIB_PATH fsfw_hal)
set(CSP_LIB_PATH ${THIRD_PARTY_FOLDER}/libcsp)
set(ETL_LIB_PATH ${THIRD_PARTY_FOLDER}/etl)
set(LWGPS_LIB_PATH ${THIRD_PARTY_FOLDER}/lwgps)
set(ARCSEC_LIB_PATH ${THIRD_PARTY_FOLDER}/arcsec_star_tracker)
set(LIB_EIVE_MISSION_PATH mission)
set(LIB_CSP_PATH ${THIRD_PARTY_FOLDER}/libcsp)
set(LIB_ETL_PATH ${THIRD_PARTY_FOLDER}/etl)
set(LIB_CATCH2_PATH ${THIRD_PARTY_FOLDER}/Catch2)
set(LIB_LWGPS_PATH ${THIRD_PARTY_FOLDER}/lwgps)
set(LIB_ARCSEC_PATH ${THIRD_PARTY_FOLDER}/arcsec_star_tracker)
set(LIB_JSON_PATH ${THIRD_PARTY_FOLDER}/json)
set(FSFW_WARNING_SHADOW_LOCAL_GCC OFF)
set(ADD_LINUX_FILES False)
set(EIVE_ADD_LINUX_FILES False)
# Analyse different OS and architecture/target options, determine BSP_PATH,
# display information about compiler etc.
@ -87,11 +93,11 @@ pre_source_hw_os_config()
if(TGT_BSP)
if(TGT_BSP MATCHES "arm/q7s" OR TGT_BSP MATCHES "arm/raspberrypi"
OR TGT_BSP MATCHES "arm/beagleboneblack"
OR TGT_BSP MATCHES "arm/beagleboneblack" OR TGT_BSP MATCHES "arm/egse"
)
set(FSFW_CONFIG_PATH "linux/fsfwconfig")
if(NOT BUILD_Q7S_SIMPLE_MODE)
set(ADD_LINUX_FILES TRUE)
set(EIVE_ADD_LINUX_FILES TRUE)
set(ADD_CSP_LIB TRUE)
set(FSFW_HAL_ADD_LINUX ON)
endif()
@ -103,6 +109,12 @@ if(TGT_BSP)
set(FSFW_HAL_ADD_RASPBERRY_PI ON)
endif()
if(TGT_BSP MATCHES "arm/egse")
# Used by configure file
set(EGSE ON)
set(FSFW_HAL_LINUX_ADD_LIBGPIOD OFF)
endif()
if(TGT_BSP MATCHES "arm/beagleboneblack")
# Used by configure file
set(BEAGLEBONEBLACK ON)
@ -117,17 +129,19 @@ else()
set(FSFW_CONFIG_PATH "${BSP_PATH}/fsfwconfig")
endif()
# Configuration files
if(NOT EIVE_BUILD_WATCHDOG)
configure_file(${COMMON_CONFIG_PATH}/commonConfig.h.in commonConfig.h)
configure_file(${FSFW_CONFIG_PATH}/FSFWConfig.h.in FSFWConfig.h)
configure_file(${FSFW_CONFIG_PATH}/OBSWConfig.h.in OBSWConfig.h)
if(TGT_BSP MATCHES "arm/q7s")
configure_file(${BSP_PATH}/boardconfig/q7sConfig.h.in q7sConfig.h)
elseif(TGT_BSP MATCHES "arm/raspberrypi")
elseif(TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/egse")
configure_file(${BSP_PATH}/boardconfig/rpiConfig.h.in rpiConfig.h)
endif()
endif()
configure_file(${WATCHDOG_PATH}/watchdogConf.h.in watchdogConf.h)
# Set common config path for FSFW
@ -136,120 +150,30 @@ set(FSFW_ADDITIONAL_INC_PATHS
${CMAKE_CURRENT_BINARY_DIR}
)
# Check whether the user has already installed Catch2 first
find_package(Catch2 3)
################################################################################
# Executable and Sources
################################################################################
# Add executable
add_executable(${TARGET_NAME})
if(ADD_ETL_LIB)
add_subdirectory(${ETL_LIB_PATH})
endif()
if(ADD_JSON_LIB)
add_subdirectory(${LIB_JSON_PATH})
endif()
if(NOT EIVE_BUILD_WATCHDOG)
if(ADD_LINUX_FILES)
add_subdirectory(${LINUX_PATH})
endif()
add_subdirectory(${BSP_PATH})
add_subdirectory(${COMMON_PATH})
if(ADD_CSP_LIB)
add_subdirectory(${CSP_LIB_PATH})
endif()
endif()
if((NOT BUILD_Q7S_SIMPLE_MODE) AND (NOT EIVE_BUILD_WATCHDOG))
add_subdirectory(${LWGPS_LIB_PATH})
add_subdirectory(${FSFW_PATH})
add_subdirectory(${MISSION_PATH})
add_subdirectory(${TEST_PATH})
add_subdirectory(${ARCSEC_LIB_PATH})
endif()
if(EIVE_BUILD_WATCHDOG)
add_subdirectory(${WATCHDOG_PATH})
endif()
################################################################################
# Post-Sources preparation
################################################################################
set_property(CACHE FSFW_OSAL PROPERTY STRINGS host linux)
if((NOT BUILD_Q7S_SIMPLE_MODE) AND (NOT EIVE_BUILD_WATCHDOG))
# Add libraries for all sources.
target_link_libraries(${TARGET_NAME} PRIVATE
${LIB_FSFW_NAME}
${LIB_OS_NAME}
${LIB_LWGPS_NAME}
)
if(TGT_BSP MATCHES "arm/q7s")
target_link_libraries(${TARGET_NAME} PRIVATE
${LIB_ARCSEC}
)
endif()
endif()
if(NOT EIVE_BUILD_WATCHDOG)
if(ADD_CSP_LIB)
target_link_libraries(${TARGET_NAME} PRIVATE
${LIB_CSP_NAME}
)
endif()
endif()
if(ADD_ETL_LIB)
target_link_libraries(${TARGET_NAME} PRIVATE
${LIB_ETL_NAME}
)
endif()
if(ADD_JSON_LIB)
target_link_libraries(${TARGET_NAME} PRIVATE
${LIB_JSON_NAME}
)
endif()
target_link_libraries(${TARGET_NAME} PRIVATE
${LIB_CXX_FS}
)
# Add include paths for all sources.
target_include_directories(${TARGET_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${FSFW_CONFIG_PATH}
${CMAKE_CURRENT_BINARY_DIR}
${ARCSEC_LIB_PATH}
)
if(TGT_BSP MATCHES "arm/q7s")
target_include_directories(${TARGET_NAME} PRIVATE
${ARCSEC_LIB_PATH}
)
endif()
#global compiler options need to be set before adding executables
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(WARNING_FLAGS
-Wall
-Wextra
-Wimplicit-fallthrough=1
-Wno-unused-parameter
-Wno-psabi
add_compile_options(
"-Wall"
"-Wextra"
"-Wimplicit-fallthrough=1"
"-Wno-unused-parameter"
"-Wno-psabi"
)
# Remove unused sections.
target_compile_options(${TARGET_NAME} PRIVATE
add_compile_options(
"-ffunction-sections"
"-fdata-sections"
)
# Removed unused sections.
target_link_options(${TARGET_NAME} PRIVATE
add_link_options(
"-Wl,--gc-sections"
)
@ -257,15 +181,162 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(COMPILER_FLAGS "/permissive-")
endif()
# Not installed, so use FetchContent to download and provide Catch2
if(NOT Catch2_FOUND)
include(FetchContent)
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.0.0-preview4
)
FetchContent_MakeAvailable(Catch2)
#fixes regression -preview4, to be confirmed in later releases
set_target_properties(Catch2 PROPERTIES DEBUG_POSTFIX "")
set_target_properties(Catch2 PROPERTIES EXCLUDE_FROM_ALL "true")
set_target_properties(Catch2WithMain PROPERTIES EXCLUDE_FROM_ALL "true")
endif()
add_library(${LIB_EIVE_MISSION})
# Add main executable
add_executable(${OBSW_NAME})
if(EIVE_CREATE_UNIQUE_OBSW_BIN)
set(OBSW_BIN_NAME ${CMAKE_PROJECT_NAME}-$ENV{USERNAME})
else()
set(OBSW_BIN_NAME ${CMAKE_PROJECT_NAME})
endif()
set_target_properties(${OBSW_NAME} PROPERTIES OUTPUT_NAME ${OBSW_BIN_NAME})
#watchdog
add_executable(${WATCHDOG_NAME} EXCLUDE_FROM_ALL)
add_subdirectory(${WATCHDOG_PATH})
target_link_libraries(${WATCHDOG_NAME} PUBLIC
${LIB_CXX_FS}
)
target_include_directories(${WATCHDOG_NAME} PUBLIC
${CMAKE_BINARY_DIR}
)
#unittests
add_executable(${UNITTEST_NAME} EXCLUDE_FROM_ALL)
if(EIVE_ADD_ETL_LIB)
add_subdirectory(${LIB_ETL_PATH})
endif()
if(EIVE_ADD_JSON_LIB)
add_subdirectory(${LIB_JSON_PATH})
endif()
if(EIVE_ADD_LINUX_FILES)
add_subdirectory(${LIB_ARCSEC_PATH})
add_subdirectory(${LINUX_PATH})
endif()
add_subdirectory(${BSP_PATH})
if(ADD_CSP_LIB)
add_subdirectory(${LIB_CSP_PATH})
endif()
add_subdirectory(${COMMON_PATH})
add_subdirectory(${LIB_LWGPS_PATH})
add_subdirectory(${FSFW_PATH})
add_subdirectory(${LIB_EIVE_MISSION_PATH})
add_subdirectory(${TEST_PATH})
add_subdirectory(${UNITTEST_PATH})
################################################################################
# Post-Sources preparation
################################################################################
# Add libraries
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC
${LIB_FSFW_NAME}
${LIB_LWGPS_NAME}
${LIB_OS_NAME}
)
target_link_libraries(${OBSW_NAME} PRIVATE
${LIB_EIVE_MISSION}
)
if(TGT_BSP MATCHES "arm/q7s")
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC
${LIB_ARCSEC}
${LIB_GPS}
)
endif()
target_link_libraries(${UNITTEST_NAME} PRIVATE
Catch2
${LIB_EIVE_MISSION}
)
if(TGT_BSP MATCHES "arm/egse")
target_link_libraries(${OBSW_NAME} PRIVATE
${LIB_ARCSEC}
)
endif()
if(ADD_CSP_LIB)
target_link_libraries(${OBSW_NAME} PRIVATE
${LIB_CSP_NAME}
)
endif()
if(EIVE_ADD_ETL_LIB)
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC
${LIB_ETL_NAME}
)
endif()
if(EIVE_ADD_JSON_LIB)
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC
${LIB_JSON_NAME}
)
endif()
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC
${LIB_CXX_FS}
)
# Add include paths for all sources.
target_include_directories(${LIB_EIVE_MISSION} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${FSFW_CONFIG_PATH}
${CMAKE_CURRENT_BINARY_DIR}
${LIB_ARCSEC_PATH}
)
if(TGT_BSP MATCHES "arm/q7s" OR TGT_BSP MATCHES "arm/egse")
target_include_directories(${LIB_EIVE_MISSION} PUBLIC
${ARCSEC_LIB_PATH}
)
endif()
if(CMAKE_VERBOSE)
message(STATUS "Warning flags: ${WARNING_FLAGS}")
endif()
# Compile options for all sources.
target_compile_options(${TARGET_NAME} PRIVATE
${WARNING_FLAGS}
)
if(${CMAKE_CROSSCOMPILING})
include (${CMAKE_SCRIPT_PATH}/HardwareOsPostConfig.cmake)
@ -297,11 +368,12 @@ string(CONCAT POST_BUILD_COMMENT
)
add_custom_command(
TARGET ${TARGET_NAME}
TARGET ${OBSW_NAME}
POST_BUILD
COMMAND ${CMAKE_SIZE} ${TARGET_NAME}${FILE_SUFFIX}
COMMAND ${CMAKE_SIZE} ${OBSW_BIN_NAME}${FILE_SUFFIX}
COMMENT ${POST_BUILD_COMMENT}
)
include (${CMAKE_SCRIPT_PATH}/BuildType.cmake)
set_build_type()

12
Justfile Normal file
View File

@ -0,0 +1,12 @@
python_script := './cmake/scripts/cmake-build-cfg.py'
default: q7s-debug-make
q7s-debug-make:
{{python_script}} -o linux -g make -b debug -t "arm/q7s" -l build-Debug-Q7S
q7s-release-make:
{{python_script}} -o linux -g make -b release -t "arm/q7s" -l build-Release-Q7S
q7s-debug-ninja:
{{python_script}} -o linux -g ninja -b debug -t "arm/q7s" -l build-Debug-Q7S

203
README.md
View File

@ -11,13 +11,18 @@
4. [Useful and Common Host Commands](#host-commands)
5. [Setting up Prerequisites](#set-up-prereq)
6. [Remote Debugging](#remote-debugging)
7. [Direct Debugging](#direct-debugging)
8. [Transfering Files to the Q7S](#file-transfer)
9. [Q7S OBC](#q7s)
10. [Static Code Analysis](#static-code-analysis)
11. [Eclipse](#eclipse)
12. [Running the OBSW on a Raspberry Pi](#rpi)
13. [FSFW](#fsfw)
6. [Remote Reset](#remote-reset)
8. [TMTC testing](#tmtc-testing)
9. [Direct Debugging](#direct-debugging)
10. [Transfering Files to the Q7S](#file-transfer)
11. [Q7S OBC](#q7s)
12. [Static Code Analysis](#static-code-analysis)
13. [Eclipse](#eclipse)
14. [Running the OBSW on a Raspberry Pi](#rpi)
15. [Running OBSW on EGSE](#egse)
16. [Manually preparing sysroots to compile gpsd](#gpsd)
17. [FSFW](#fsfw)
18. [Coding Style](#coding-style)
# <a id="general"></a> General information
@ -35,7 +40,7 @@ Target systems:
relevant pages. The most recent datasheet can be found
[here](https://trac2.xiphos.ca/manual/wiki/Q7RevB/UserManual).
* Linux OS built with Yocto 2.5
* Linux Kernel https://github.com/XiphosSystemsCorp/linux-xlnx.git . EIVE version can be found
* [Linux Kernel](https://github.com/XiphosSystemsCorp/linux-xlnx.git) . EIVE version can be found
[here](https://github.com/spacefisch/linux-xlnx) . Pre-compiled files can be
found [here](https://eive-cloud.irs.uni-stuttgart.de/index.php/apps/files/?dir=/EIVE_IRS/Software/q7s-linux-components&fileid=777299).
* Q7S base project can be found [here](https://egit.irs.uni-stuttgart.de/eive/q7s-base)
@ -102,7 +107,7 @@ When using Windows, run theses steps in MSYS2.
```sh
mkdir build-Debug-Q7S && cd build-Debug-Q7S
cmake -DTGT_BSP="arm/q7s" -DCMAKE_BUILD_TYPE=Debug -DOS_FSFW=linux ..
cmake -DTGT_BSP="arm/q7s" -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . -j
```
@ -117,8 +122,7 @@ When using Windows, run theses steps in MSYS2.
This will invoke a Python script which in turn invokes CMake with the correct
arguments to configure CMake for Q7S cross-compilation.
You can build the hosted variant of the OBSW by replacing `-DOS_FSFW=linux` with
`-DOS_FSFW=host`. There are also different values for `-DTGT_BSP` to build for the Raspberry Pi
There are also different values for `-DTGT_BSP` to build for the Raspberry Pi
or the Beagle Bone Black: `arm/raspberrypi` and `arm/beagleboneblack`.
5. Build the software with
@ -157,20 +161,47 @@ automatically.
### Q7S OBSW
The EIVE OBSW is the default target if no target is specified.
```sh
mkdir build-Debug-Q7S && cd build-Debug-Q7S
cmake -DTGT_BSP=arm/q7s -DFSFW_OSAL=linux -DCMAKE_BUILD_TYPE=Debug ..
cmake -DTGT_BSP=arm/q7s -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . -j
```
### Q7S Watchdog
To build the EIVE watchdog, the corresponding target must be specified in the build command.
The configure steps do not need to be repeated if the folder has already been configured.
```sh
mkdir build-Debug-Q7S && cd build-Debug-Q7S
cmake -DTGT_BSP=arm/q7s -DFSFW_OSAL=linux -DEIVE_BUILD_WATCHDOG=ON -DCMAKE_BUILD_TYPE=Debug ..
mkdir build-Debug-Watchdog && cd build-Debug-Watchdog
cmake -DTGT_BSP=arm/q7s -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . --target eive-watchdog -j
```
### Hosted
You can also use the FSFW OSAL `host` to build on Windows or for generic OSes.
Note: Currently this is not supported.
```sh
mkdir build-Debug-Host && cd build-Debug-Host
cmake -DFSFW_OSAL=host -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . -j
```
### Unittests
To build the unittests, the corresponding target must be specified in the build command.
The configure steps do not need to be repeated if the folder has already been configured.
```sh
mkdir build-Debug-Unittest && cd build-Debug-Unittest
cmake ..
cmake --build . --target eive-unittests -j
```
## Connect to EIVE flatsat
### DNS
@ -411,12 +442,24 @@ Beagle Bone Black for download here
Download it and unzip it somewhere in the Xilinx installation folder.
You can use the following command if `wget` can be used or for CI/CD:
```
wget https://eive-cloud.irs.uni-stuttgart.de/index.php/s/agnJGYeRf6fw2ci/download/cortexa9hf-neon-xiphos-linux-gnueabi.tar.gz
```sh
wget https://eive-cloud.irs.uni-stuttgart.de/index.php/s/SyXpdBBQX32xPgE/download/cortexa9hf-neon-xiphos-linux-gnueabi.tar.gz
```
Then, create a new environmental variables `Q7S_SYSROOT` and set it to the local system root path.
### Updating system root for CI
If the system root is updated, it needs to be manually updated on the buggy file server.
If access on `buggy.irs.uni-stuttgart.de` is possible with `ssh` and the rootfs in the cloud
[was updated](https://eive-cloud.irs.uni-stuttgart.de/index.php/apps/files/?dir=/EIVE_IRS/Software/rootfs&fileid=831849)
as well, you can update the rootfs like this:
```sh
cd /var/www/eive/tools
wget https://eive-cloud.irs.uni-stuttgart.de/index.php/s/SyXpdBBQX32xPgE/download/cortexa9hf-neon-xiphos-linux-gnueabi.tar.gz
```
## Setting up UNIX environment for real-time functionalities
Please note that on most UNIX environments (e.g. Ubuntu), the real time functionalities
@ -514,10 +557,10 @@ ssh root@192.168.133.10
```
If this has not been done yet, you can access the serial
console of the Q7S like this to set it
console of the Q7S like this
```sh
picocom -b 115200 /dev/ttyUSB0
picocom -b 115200 /dev/q7sSerial
```
The flatsat has the aliases and shell scripts `q7s_ssh` and `q7s_serial` for this task as well.
@ -554,6 +597,63 @@ alias or shell script to do this quickly.
Note: When now setting up a debug session in the Xilinx SDK or Eclipse, the host must be set
to localhost instead of the IP address of the Q7S.
# <a id="remote-reset"></a> Remote Reset
1. Launch xilinx hardware server on flatsat with alias
````
launch-hwserver-xilinx
````
2. On host PC start xsc
3. In xsct console type the follwing command to connect to the hardware server (replace </flatsat-pc-ip-address/> with the IP address of the flatsat PC. Can be found out with ifconfig)
````
connect -url tcp:</flatsat-pc-ip-address/>:3121
````
4. The following command will list all available devices
````
targets
````
5. Connect to the APU of the Q7S
````
target </APU-number/>
````
6. Perform reset
````
rst
````
# <a id="tmtc-testing"></a> TMTC testing
The OBSW supports sending PUS TM packets via TCP or the PDEC IP Core which transmits the data as
CADU frames. To make the CADU frames receivabel by the
[TMTC porgram](https://egit.irs.uni-stuttgart.de/eive/eive-tmtc), a python script is running as
`systemd` service named `tmtc_bridge` on the flatsat PC which forwards TCP commands to the TCP
server of the OBC and reads CADU frames from a serial interface.
You can check whether the service is running the following command on the flatsat PC
```sh
systemctl status tmtc_bridge
```
The PUS packets transported with the CADU frames are extracted
and forwared to the TMTC program's TCP client. The code of the TMTC bridge can be found
[here](https://egit.irs.uni-stuttgart.de/eive/tmtc-bridge). To connect the TMTC program to the
TMTC-bridge a port forwarding from a host must be set up with the following command:
```sh
ssh -L 1537:127.0.0.1:7100 eive@2001:7c0:2018:1099:babe:0:e1fe:f1a5 -t bash
```
You can print the output of the `systemd` service with
```sh
journalctl -u tmtc_bridge
```
This can be helpful to determine whether any TCs arrive or TMs are coming back.
Note: The encoding of the TM packets and conversion of CADU frames takes some time.
Thus the replies are received with a larger delay compared to a direct TCP connection.
# <a id="direct-debugging"></a> Direct Debugging
1. Assign static IP address to Q7S
@ -966,26 +1066,7 @@ cat file.bin | hexdump -v -n X
## Preparation of a fresh rootfs and SD card
This section summarizes important changes between a fresh rootfs and the current
EIVE implementation
### rootfs
- Mount point `/mnt/sd0` created for SD card 0. Created with `mkdir`
- Mount point `/mnt/sd1` created for SD card 1. Created with `mkdir`
- Folder `scripts` in `/home/root` folder.
- `scripts` folder currently contains a few shell helper scripts
- Folder `profile.d` in `/etc` folder which contains the `path-set.sh` script
which is sourced at software startup
- Library `libwire.so` in `/usr/lib` folder
### SD Cards
- Folder `bin` for binaries, for example the OBSW
- Folder `misc` for miscellaneous files. Contains `ls` for directory listings
- Folder `tc` for telecommands
- Folder `tm` for telemetry
- Folder `xdi` for XDI components (e.g. for firmware or device tree updates)
See [q7s-package repository README](https://egit.irs.uni-stuttgart.de/eive/q7s-package)
# <a id="static-code-analysis"></a> Running cppcheck on the Software
@ -1033,7 +1114,7 @@ The [TCF agent](https://wiki.eclipse.org/TCF) can be used to perform remote debu
1. Install the TCF agent plugin in Eclipse from
the [releases](https://www.eclipse.org/tcf/downloads.php). Go to
Help &rarr; Install New Software and use the download page, for
example https://download.eclipse.org/tools/tcf/releases/1.6/1.6.2/ to search for the plugin and install it.
example https://download.eclipse.org/tools/tcf/releases/1.7/1.7.0/ to search for the plugin and install it. You can find the newest version [here](https://www.eclipse.org/tcf/downloads.php)
2. Go to Window &rarr; Perspective &rarr; Open Perspective and open the **Target Explorer Perspective**.
Here, the Q7S should show up if the local port forwarding was set up as explained previously.
@ -1072,6 +1153,38 @@ sudo apt-get install gpiod libgpiod-dev
to install the required GPIO libraries before cloning the system root folder.
# <a id="egse"></a> Running OBSW on EGSE
The EGSE is a test system from arcsec build arround a raspberry pi 4 to test the star tracker. The IP address of the EGSE (raspberry pi) is 192.168.18.31. An ssh session can be opened with
````
ssh pi@192.168.18.31
````
Password: raspberry
To run the obsw perform the following steps:
1. Build the cmake EGSE Configuration
* the sysroots for the EGSE can be found [here](https://eive-cloud.irs.uni-stuttgart.de/index.php/apps/files/?dir=/EIVE_IRS/Software/egse&fileid=1190471)
* toolchain for linux host can be downloaded from [here](https://github.com/Pro/raspi-toolchain)
* toolchain for windows host from [here](https://gnutoolchains.com/raspberry/) (the raspios-buster-armhf toolchain is the right one for the EGSE)
2. Disable the ser2net systemd service on the EGSE
````sh
$ sudo systemctl stop ser2net.service
````
3. Power on the star tracker by running
````sh
$ ~/powerctrl/enable0.sh`
````
4. Run portforwarding script for tmtc tcp connection and tcf agent on host PC
````sh
$ ./scripts/egse-port.sh
````
5. The star tracker can be powered off by running
````sh
$ ~/powerctrl/disable0.sh
````
# <a id="gpsd"></a> Manually preparing sysroots to compile gpsd
Copy all header files from [here](https://eive-cloud.irs.uni-stuttgart.de/index.php/apps/files/?dir=/EIVE_IRS/Software/gpsd&fileid=1189985) to the /usr/include directory and all static libraries to /usr/lib.
# <a id="fsfw"></a> Flight Software Framework (FSFW)
An EIVE fork of the FSFW is submodules into this repository.
@ -1091,3 +1204,15 @@ git merge upstream/master
Alternatively, changes from other upstreams (forks) and branches can be merged like that
in the same way.
# <a id="coding-style"></a> Coding Style
* the formatting is based on the clang-format tools
## Setting up eclipse auto-fromatter with clang-format
1. Help &rarr; Install New Software &rarr; Add
2. In location insert the link http://www.cppstyle.com/luna
3. The software package CppStyle should now be available for installation
4. On windows download the clang-formatting tools from https://llvm.org/builds/. On linux clang-format can be installed with the package manager.
5. Navigate to Preferences &rarr; C/C++ &rarr; CppStyle
6. Insert the path to the clang-format executable
7. Under C/C++ &rarr; Code Style &rarr; Formatter, change the formatter to CppStyle (clang-format)
8. Code can now be formatted with the clang tool by using the key combination Ctrl + Shift + f

View File

@ -2,7 +2,9 @@ FROM ubuntu:focal
RUN apt-get update
RUN apt-get --yes upgrade
RUN apt-get --yes install cmake libgpiod-dev xz-utils nano curl
#tzdata is a dependency, won't install otherwise
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get --yes install cmake libgpiod-dev xz-utils nano curl git gcc g++ lcov valgrind libgps-dev
# Q7S root filesystem, required for cross-compilation.
RUN mkdir -p /usr/rootfs; \
@ -14,6 +16,5 @@ RUN mkdir -p /usr/tools; \
curl https://buggy.irs.uni-stuttgart.de/eive/tools/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.gz \
| tar -xz -C /usr/tools
ENV Q7S_SYSROOT="/usr/rootfs/cortexa9hf-neon-xiphos-linux-gnueabi"
ENV PATH=$PATH:"/usr/tools/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin"

View File

@ -1,48 +1,36 @@
pipeline {
agent any
environment {
BUILDDIR_Q7 = 'build_q7'
BUILDDIR_LINUX = 'build_linux'
}
agent {
docker {
image 'eive-obsw-ci:d2'
args '--sysctl fs.mqueue.msg_max=100'
}
}
stages {
stage('Build Container') {
when {
changeset "automation/Dockerfile-q7s"
branch 'develop'
}
steps {
sh 'docker build -t eive-fsw-build-q7s:gcc8 - < automation/Dockerfile-q7s'
}
}
stage('Clean') {
when {
anyOf {
changelog 'cleanCI'
changeset '*.cmake'
changeset 'CMakeLists.txt'
}
}
steps {
sh 'rm -rf build-q7s-debug'
sh 'rm -rf $BUILDDIR_Q7'
sh 'rm -rf $BUILDDIR_LINUX'
}
}
stage('Build Q7S') {
agent {
docker {
image 'eive-fsw-build-q7s:gcc8'
reuseNode true
}
}
steps {
dir('build-q7s-debug') {
sh 'cmake -DTGT_BSP="arm/q7s" -DCMAKE_BUILD_TYPE=Debug -DFSFW_OSAL=linux ..'
dir(BUILDDIR_Q7) {
sh 'cmake -DTGT_BSP="arm/q7s" -DCMAKE_BUILD_TYPE=Debug ..'
sh 'cmake --build . -j'
}
}
}
stage('Deploy') {
when {
tag 'v*.*.*'
}
stage('Unittests') {
steps {
sh 'echo Deploying'
dir(BUILDDIR_LINUX) {
sh 'cmake ..'
sh 'cmake --build . -t eive-unittest -j'
sh './eive-unittest'
}
}
}
}

7
bsp_egse/CMakeLists.txt Normal file
View File

@ -0,0 +1,7 @@
target_sources(${OBSW_NAME} PUBLIC
InitMission.cpp
main.cpp
ObjectFactory.cpp
)
add_subdirectory(boardconfig)

192
bsp_egse/InitMission.cpp Normal file
View File

@ -0,0 +1,192 @@
#include "InitMission.h"
#include <fsfw/objectmanager/ObjectManager.h>
#include <fsfw/objectmanager/ObjectManagerIF.h>
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
#include <fsfw/serviceinterface/ServiceInterface.h>
#include <fsfw/tasks/FixedTimeslotTaskIF.h>
#include <fsfw/tasks/PeriodicTaskIF.h>
#include <fsfw/tasks/TaskFactory.h>
#include <mission/utility/InitMission.h>
#include <iostream>
#include "OBSWConfig.h"
#include "ObjectFactory.h"
#include "objects/systemObjectList.h"
#include "pollingsequence/pollingSequenceFactory.h"
ServiceInterfaceStream sif::debug("DEBUG");
ServiceInterfaceStream sif::info("INFO");
ServiceInterfaceStream sif::warning("WARNING");
ServiceInterfaceStream sif::error("ERROR");
ObjectManagerIF* objectManager = nullptr;
void initmission::initMission() {
sif::info << "Make sure the systemd service ser2net on the egse has been stopped "
<< "(alias stop-ser2net)" << std::endl;
sif::info << "Make sure the power lines of the star tracker have been enabled "
<< "(alias enable-startracker)" << std::endl;
sif::info << "Building global objects.." << std::endl;
/* Instantiate global object manager and also create all objects */
ObjectManager::instance()->setObjectFactoryFunction(ObjectFactory::produce, nullptr);
sif::info << "Initializing all objects.." << std::endl;
ObjectManager::instance()->initialize();
/* This function creates and starts all tasks */
initTasks();
}
void initmission::initTasks() {
TaskFactory* factory = TaskFactory::instance();
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
if (factory == nullptr) {
/* Should never happen ! */
return;
}
#if OBSW_PRINT_MISSED_DEADLINES == 1
void (*missedDeadlineFunc)(void) = TaskFactory::printMissedDeadline;
#else
void (*missedDeadlineFunc)(void) = nullptr;
#endif
/* TMTC Distribution */
PeriodicTaskIF* tmtcDistributor = factory->createPeriodicTask(
"DIST", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
result = tmtcDistributor->addComponent(objects::CCSDS_PACKET_DISTRIBUTOR);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "Object add component failed" << std::endl;
}
result = tmtcDistributor->addComponent(objects::PUS_PACKET_DISTRIBUTOR);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "Object add component failed" << std::endl;
}
result = tmtcDistributor->addComponent(objects::TM_FUNNEL);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "Object add component failed" << std::endl;
}
PeriodicTaskIF* tmtcBridgeTask = factory->createPeriodicTask(
"TMTC_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
result = tmtcBridgeTask->addComponent(objects::TMTC_BRIDGE);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "Add component TMTC Bridge failed" << std::endl;
}
PeriodicTaskIF* tmtcPollingTask = factory->createPeriodicTask(
"TMTC_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
result = tmtcPollingTask->addComponent(objects::TMTC_POLLING_TASK);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "Add component TMTC Polling failed" << std::endl;
}
/* PUS Services */
std::vector<PeriodicTaskIF*> pusTasks;
createPusTasks(*factory, missedDeadlineFunc, pusTasks);
std::vector<PeriodicTaskIF*> pstTasks;
FixedTimeslotTaskIF* pst = factory->createFixedTimeslotTask(
"STAR_TRACKER_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc);
result = pst::pstUart(pst);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl;
}
pstTasks.push_back(pst);
PeriodicTaskIF* strHelperTask = factory->createPeriodicTask(
"STR_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
result = strHelperTask->addComponent(objects::STR_HELPER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("STR_HELPER", objects::STR_HELPER);
}
pstTasks.push_back(strHelperTask);
auto taskStarter = [](std::vector<PeriodicTaskIF*>& taskVector, std::string name) {
for (const auto& task : taskVector) {
if (task != nullptr) {
task->startTask();
} else {
sif::error << "Task in vector " << name << " is invalid!" << std::endl;
}
}
};
sif::info << "Starting tasks.." << std::endl;
tmtcDistributor->startTask();
tmtcBridgeTask->startTask();
tmtcPollingTask->startTask();
taskStarter(pstTasks, "PST Tasks");
taskStarter(pusTasks, "PUS Tasks");
sif::info << "Tasks started.." << std::endl;
}
void initmission::createPusTasks(TaskFactory& factory,
TaskDeadlineMissedFunction missedDeadlineFunc,
std::vector<PeriodicTaskIF*>& taskVec) {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
PeriodicTaskIF* pusVerification = factory.createPeriodicTask(
"PUS_VERIF", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
result = pusVerification->addComponent(objects::PUS_SERVICE_1_VERIFICATION);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "Object add component failed" << std::endl;
}
taskVec.push_back(pusVerification);
PeriodicTaskIF* pusEvents = factory.createPeriodicTask(
"PUS_EVENTS", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
result = pusEvents->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS_EVENTS", objects::PUS_SERVICE_5_EVENT_REPORTING);
}
result = pusEvents->addComponent(objects::EVENT_MANAGER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS_MGMT", objects::EVENT_MANAGER);
}
taskVec.push_back(pusEvents);
PeriodicTaskIF* pusHighPrio = factory.createPeriodicTask(
"PUS_HIGH_PRIO", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
result = pusHighPrio->addComponent(objects::PUS_SERVICE_2_DEVICE_ACCESS);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS2", objects::PUS_SERVICE_2_DEVICE_ACCESS);
}
result = pusHighPrio->addComponent(objects::PUS_SERVICE_9_TIME_MGMT);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS9", objects::PUS_SERVICE_9_TIME_MGMT);
}
taskVec.push_back(pusHighPrio);
PeriodicTaskIF* pusMedPrio = factory.createPeriodicTask(
"PUS_MED_PRIO", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
result = pusMedPrio->addComponent(objects::PUS_SERVICE_8_FUNCTION_MGMT);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS8", objects::PUS_SERVICE_8_FUNCTION_MGMT);
}
result = pusMedPrio->addComponent(objects::PUS_SERVICE_200_MODE_MGMT);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS200", objects::PUS_SERVICE_200_MODE_MGMT);
}
result = pusMedPrio->addComponent(objects::PUS_SERVICE_20_PARAMETERS);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS20", objects::PUS_SERVICE_20_PARAMETERS);
}
result = pusMedPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS3", objects::PUS_SERVICE_3_HOUSEKEEPING);
}
taskVec.push_back(pusMedPrio);
PeriodicTaskIF* pusLowPrio = factory.createPeriodicTask(
"PUS_LOW_PRIO", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.6, missedDeadlineFunc);
result = pusLowPrio->addComponent(objects::PUS_SERVICE_17_TEST);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS17", objects::PUS_SERVICE_17_TEST);
}
result = pusLowPrio->addComponent(objects::INTERNAL_ERROR_REPORTER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("INT_ERR_RPRT", objects::INTERNAL_ERROR_REPORTER);
}
taskVec.push_back(pusLowPrio);
}

21
bsp_egse/InitMission.h Normal file
View File

@ -0,0 +1,21 @@
#ifndef BSP_LINUX_INITMISSION_H_
#define BSP_LINUX_INITMISSION_H_
#include <vector>
#include "fsfw/tasks/Typedef.h"
class PeriodicTaskIF;
class TaskFactory;
namespace initmission {
void initMission();
void initTasks();
void createPstTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
std::vector<PeriodicTaskIF*>& taskVec);
void createPusTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
std::vector<PeriodicTaskIF*>& taskVec);
}; // namespace initmission
#endif /* BSP_LINUX_INITMISSION_H_ */

View File

@ -0,0 +1,49 @@
#include "ObjectFactory.h"
#include <devConf.h>
#include <fsfw_hal/linux/uart/UartComIF.h>
#include <fsfw_hal/linux/uart/UartCookie.h>
#include <mission/devices/GPSHyperionHandler.h>
#include "OBSWConfig.h"
#include "busConf.h"
#include "fsfw/datapoollocal/LocalDataPoolManager.h"
#include "fsfw/tmtcpacket/pus/tm.h"
#include "fsfw/tmtcservices/CommandingServiceBase.h"
#include "fsfw/tmtcservices/PusServiceBase.h"
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"
#include "linux/devices/startracker/StarTrackerHandler.h"
#include "mission/core/GenericFactory.h"
#include "mission/utility/TmFunnel.h"
#include "objects/systemObjectList.h"
#include "tmtc/apid.h"
#include "tmtc/pusIds.h"
void Factory::setStaticFrameworkObjectIds() {
PusServiceBase::packetSource = objects::PUS_PACKET_DISTRIBUTOR;
PusServiceBase::packetDestination = objects::TM_FUNNEL;
CommandingServiceBase::defaultPacketSource = objects::PUS_PACKET_DISTRIBUTOR;
CommandingServiceBase::defaultPacketDestination = objects::TM_FUNNEL;
TmFunnel::downlinkDestination = objects::TMTC_BRIDGE;
TmFunnel::storageDestination = objects::NO_OBJECT;
VerificationReporter::messageReceiver = objects::PUS_SERVICE_1_VERIFICATION;
TmPacketBase::timeStamperId = objects::TIME_STAMPER;
}
void ObjectFactory::produce(void* args) {
Factory::setStaticFrameworkObjectIds();
ObjectFactory::produceGenericObjects();
UartCookie* starTrackerCookie =
new UartCookie(objects::STAR_TRACKER, egse::STAR_TRACKER_UART, UartModes::NON_CANONICAL,
uart::STAR_TRACKER_BAUD, startracker::MAX_FRAME_SIZE * 2 + 2);
new UartComIF(objects::UART_COM_IF);
starTrackerCookie->setNoFixedSizeReply();
StrHelper* strHelper = new StrHelper(objects::STR_HELPER);
StarTrackerHandler* starTrackerHandler = new StarTrackerHandler(
objects::STAR_TRACKER, objects::UART_COM_IF, starTrackerCookie, strHelper);
starTrackerHandler->setStartUpImmediately();
}

8
bsp_egse/ObjectFactory.h Normal file
View File

@ -0,0 +1,8 @@
#ifndef BSP_LINUX_OBJECTFACTORY_H_
#define BSP_LINUX_OBJECTFACTORY_H_
namespace ObjectFactory {
void produce(void* args);
}; // namespace ObjectFactory
#endif /* BSP_LINUX_OBJECTFACTORY_H_ */

View File

@ -0,0 +1,7 @@
target_sources(${OBSW_NAME} PRIVATE
print.c
)
target_include_directories(${OBSW_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)

View File

@ -0,0 +1,8 @@
#ifndef BSP_EGSE_BOARDCONFIG_BUSCONF_H_
#define BSP_EGSE_BOARDCONFIG_BUSCONF_H_
namespace egse {
static constexpr char STAR_TRACKER_UART[] = "/dev/serial0";
}
#endif /* BSP_EGSE_BOARDCONFIG_BUSCONF_H_ */

View File

@ -0,0 +1,38 @@
///\file
/******************************************************************************
The MIT License(MIT)
Embedded Template Library.
https://github.com/ETLCPP/etl
https://www.etlcpp.com
Copyright(c) 2019 jwellbelove
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files(the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions :
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
******************************************************************************/
#ifndef __ETL_PROFILE_H__
#define __ETL_PROFILE_H__
#define ETL_CHECK_PUSH_POP
#define ETL_CPP11_SUPPORTED 1
#define ETL_NO_NULLPTR_SUPPORT 0
#endif

View File

@ -0,0 +1,15 @@
#ifndef LINUX_GCOV_H_
#define LINUX_GCOV_H_
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
#ifdef GCOV
extern "C" void __gcov_flush();
#else
void __gcov_flush() {
sif::info << "GCC GCOV: Please supply GCOV=1 in Makefile if "
"coverage information is desired.\n"
<< std::flush;
}
#endif
#endif /* LINUX_GCOV_H_ */

View File

@ -0,0 +1,10 @@
#include <bsp_egse/boardconfig/print.h>
#include <stdio.h>
void printChar(const char* character, bool errStream) {
if (errStream) {
putc(*character, stderr);
return;
}
putc(*character, stdout);
}

View File

@ -0,0 +1,8 @@
#ifndef HOSTED_BOARDCONFIG_PRINT_H_
#define HOSTED_BOARDCONFIG_PRINT_H_
#include <stdbool.h>
void printChar(const char* character, bool errStream);
#endif /* HOSTED_BOARDCONFIG_PRINT_H_ */

View File

@ -0,0 +1,6 @@
#ifndef BSP_RPI_BOARDCONFIG_RPI_CONFIG_H_
#define BSP_RPI_BOARDCONFIG_RPI_CONFIG_H_
#include <cstdint>
#endif /* BSP_RPI_BOARDCONFIG_RPI_CONFIG_H_ */

28
bsp_egse/main.cpp Normal file
View File

@ -0,0 +1,28 @@
#include <iostream>
#include "InitMission.h"
#include "OBSWConfig.h"
#include "OBSWVersion.h"
#include "fsfw/FSFWVersion.h"
#include "fsfw/tasks/TaskFactory.h"
/**
* @brief This is the main program entry point for the egse (raspberry pi 4)
* @return
*/
int main(void) {
std::cout << "-- EIVE OBSW --" << std::endl;
std::cout << "-- Compiled for EGSE from Arcsec"
<< " --" << std::endl;
std::cout << "-- OBSW " << SW_NAME << " v" << SW_VERSION << "." << SW_SUBVERSION << "."
<< SW_REVISION << ", FSFW v" << FSFW_VERSION << "." << FSFW_SUBVERSION << FSFW_REVISION
<< "--" << std::endl;
std::cout << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl;
initmission::initMission();
for (;;) {
/* Suspend main thread by sleeping it. */
TaskFactory::delayTask(5000);
}
}

View File

@ -1,4 +1,4 @@
target_sources(${TARGET_NAME} PUBLIC
target_sources(${OBSW_NAME} PUBLIC
InitMission.cpp
main.cpp
ObjectFactory.cpp

View File

@ -1,20 +1,19 @@
#include "InitMission.h"
#include "ObjectFactory.h"
#include <OBSWConfig.h>
#include <fsfw/objectmanager/ObjectManager.h>
#include <fsfw/objectmanager/ObjectManagerIF.h>
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
#include <fsfw/objectmanager/ObjectManager.h>
#include <fsfw/tasks/FixedTimeslotTaskIF.h>
#include <fsfw/tasks/PeriodicTaskIF.h>
#include <fsfw/tasks/TaskFactory.h>
#include <mission/utility/InitMission.h>
#include <iostream>
#include "ObjectFactory.h"
#ifdef LINUX
ServiceInterfaceStream sif::debug("DEBUG");
ServiceInterfaceStream sif::info("INFO");
@ -55,8 +54,7 @@ void initmission::initTasks() {
/* TMTC Distribution */
PeriodicTaskIF* tmTcDistributor = factory->createPeriodicTask(
"DIST", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
ReturnValue_t result = tmTcDistributor->addComponent(
objects::CCSDS_PACKET_DISTRIBUTOR);
ReturnValue_t result = tmTcDistributor->addComponent(objects::CCSDS_PACKET_DISTRIBUTOR);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "Object add component failed" << std::endl;
}

View File

@ -4,6 +4,6 @@
namespace initmission {
void initMission();
void initTasks();
};
}; // namespace initmission
#endif /* BSP_LINUX_INITMISSION_H_ */

View File

@ -1,14 +1,14 @@
#include "ObjectFactory.h"
#include "OBSWConfig.h"
#include <fsfw/tmtcservices/CommandingServiceBase.h>
#include <fsfw/tmtcservices/PusServiceBase.h>
#include <mission/core/GenericFactory.h>
#include <mission/utility/TmFunnel.h>
#include <objects/systemObjectList.h>
#include <tmtc/apid.h>
#include <tmtc/pusIds.h>
#include <fsfw/tmtcservices/CommandingServiceBase.h>
#include <fsfw/tmtcservices/PusServiceBase.h>
#include <mission/core/GenericFactory.h>
#include <mission/utility/TmFunnel.h>
#include "OBSWConfig.h"
#if OBSW_USE_TMTC_TCP_BRIDGE == 0
#include "fsfw/osal/common/UdpTcPollingTask.h"
@ -20,7 +20,6 @@
#include <fsfw/tmtcpacket/pus/tm.h>
#if OBSW_ADD_TEST_CODE == 1
#include <test/testtasks/TestTask.h>
#endif
@ -44,18 +43,5 @@ void ObjectFactory::produce(void* args){
Factory::setStaticFrameworkObjectIds();
ObjectFactory::produceGenericObjects();
#if OBSW_USE_TMTC_TCP_BRIDGE == 0
sif::info << "Setting up UDP TMTC bridge with listener port " <<
UdpTmTcBridge::DEFAULT_SERVER_PORT << std::endl;
new UdpTmTcBridge(objects::TMTC_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR);
new UdpTcPollingTask(objects::TMTC_POLLING_TASK, objects::TMTC_BRIDGE);
#else
sif::info << "Setting up TCP TMTC bridge with listener port " <<
TcpTmTcServer::DEFAULT_SERVER_PORT << std::endl;
new TcpTmTcBridge(objects::TMTC_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR);
new TcpTmTcServer(objects::TMTC_POLLING_TASK, objects::TMTC_BRIDGE);
#endif
new TestTask(objects::TEST_TASK);
}

View File

@ -1,10 +1,9 @@
#ifndef BSP_LINUX_OBJECTFACTORY_H_
#define BSP_LINUX_OBJECTFACTORY_H_
namespace ObjectFactory {
void setStatics();
void produce(void* args);
};
}; // namespace ObjectFactory
#endif /* BSP_LINUX_OBJECTFACTORY_H_ */

View File

@ -1,8 +1,8 @@
target_sources(${TARGET_NAME} PRIVATE
target_sources(${OBSW_NAME} PRIVATE
print.c
)
target_include_directories(${TARGET_NAME} PUBLIC
target_include_directories(${OBSW_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)

View File

@ -7,7 +7,8 @@ extern "C" void __gcov_flush();
#else
void __gcov_flush() {
sif::info << "GCC GCOV: Please supply GCOV=1 in Makefile if "
"coverage information is desired.\n" << std::flush;
"coverage information is desired.\n"
<< std::flush;
}
#endif

View File

@ -9,7 +9,3 @@ void printChar(const char* character, bool errStream) {
}
putc(*character, stdout);
}

View File

@ -1,26 +1,25 @@
#include "ArduinoComIF.h"
#include "ArduinoCookie.h"
#include <fsfw/globalfunctions/DleEncoder.h>
#include <fsfw/globalfunctions/CRC.h>
#include <fsfw/globalfunctions/DleEncoder.h>
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
#include "ArduinoCookie.h"
// This only works on Linux
#ifdef LINUX
#include <termios.h>
#include <fcntl.h>
#include <termios.h>
#include <unistd.h>
#elif WIN32
#include <windows.h>
#include <strsafe.h>
#include <windows.h>
#endif
#include <cstring>
ArduinoComIF::ArduinoComIF(object_id_t setObjectId, bool promptComIF,
const char *serialDevice):
rxBuffer(MAX_PACKET_SIZE * MAX_NUMBER_OF_SPI_DEVICES*10, true),
SystemObject(setObjectId) {
ArduinoComIF::ArduinoComIF(object_id_t setObjectId, bool promptComIF, const char *serialDevice)
: rxBuffer(MAX_PACKET_SIZE * MAX_NUMBER_OF_SPI_DEVICES * 10, true), SystemObject(setObjectId) {
#ifdef LINUX
initialized = false;
serialPort = ::open("/dev/ttyUSB0", O_RDWR);
@ -66,7 +65,6 @@ ArduinoComIF::ArduinoComIF(object_id_t setObjectId, bool promptComIF,
sif::info << "Please enter the COM port (c to cancel): " << std::flush;
std::string comPort;
while (hCom == INVALID_HANDLE_VALUE) {
std::getline(std::cin, comPort);
if (comPort[0] == 'c') {
break;
@ -80,37 +78,29 @@ ArduinoComIF::ArduinoComIF(object_id_t setObjectId, bool promptComIF,
0, // Non Overlapped I/O
NULL); // Null for Comm Devices
if (hCom == INVALID_HANDLE_VALUE)
{
if (hCom == INVALID_HANDLE_VALUE) {
if (GetLastError() == 2) {
sif::error << "COM Port does not found!" << std::endl;
}
else {
} else {
TCHAR err[128];
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL,
GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
err, sizeof(err), NULL);
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), err, sizeof(err), NULL);
// Handle the error.
sif::info << "CreateFileA Error code: " << GetLastError()
<< std::endl;
sif::info << "CreateFileA Error code: " << GetLastError() << std::endl;
sif::error << err << std::flush;
}
sif::info << "Please enter a valid COM port: " << std::flush;
}
}
}
serialParams.DCBlength = sizeof(serialParams);
if (baudRate == 9600) {
serialParams.BaudRate = CBR_9600;
}
if (baudRate == 115200) {
serialParams.BaudRate = CBR_115200;
}
else {
} else {
serialParams.BaudRate = baudRate;
}
@ -143,29 +133,22 @@ ReturnValue_t ArduinoComIF::initializeInterface(CookieIF * cookie) {
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t ArduinoComIF::sendMessage(CookieIF *cookie, const uint8_t *data,
size_t len) {
ReturnValue_t ArduinoComIF::sendMessage(CookieIF *cookie, const uint8_t *data, size_t len) {
ArduinoCookie *arduinoCookie = dynamic_cast<ArduinoCookie *>(cookie);
if (arduinoCookie == nullptr) {
return INVALID_COOKIE_TYPE;
}
return sendMessage(arduinoCookie->command, arduinoCookie->address, data,
len);
return sendMessage(arduinoCookie->command, arduinoCookie->address, data, len);
}
ReturnValue_t ArduinoComIF::getSendSuccess(CookieIF *cookie) {
ReturnValue_t ArduinoComIF::getSendSuccess(CookieIF *cookie) { return RETURN_OK; }
ReturnValue_t ArduinoComIF::requestReceiveMessage(CookieIF *cookie, size_t requestLen) {
return RETURN_OK;
}
ReturnValue_t ArduinoComIF::requestReceiveMessage(CookieIF *cookie,
size_t requestLen) {
return RETURN_OK;
}
ReturnValue_t ArduinoComIF::readReceivedMessage(CookieIF *cookie,
uint8_t **buffer, size_t *size) {
ReturnValue_t ArduinoComIF::readReceivedMessage(CookieIF *cookie, uint8_t **buffer, size_t *size) {
handleSerialPortRx();
ArduinoCookie *arduinoCookie = dynamic_cast<ArduinoCookie *>(cookie);
@ -178,8 +161,8 @@ ReturnValue_t ArduinoComIF::readReceivedMessage(CookieIF *cookie,
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t ArduinoComIF::sendMessage(uint8_t command,
uint8_t address, const uint8_t *data, size_t dataLen) {
ReturnValue_t ArduinoComIF::sendMessage(uint8_t command, uint8_t address, const uint8_t *data,
size_t dataLen) {
if (dataLen > UINT16_MAX) {
return TOO_MUCH_DATA;
}
@ -193,16 +176,15 @@ ReturnValue_t ArduinoComIF::sendMessage(uint8_t command,
size_t remainingLen = sizeof(sendBuffer) - 1;
size_t encodedLen = 0;
ReturnValue_t result = DleEncoder::encode(&command, 1, currentPosition,
remainingLen, &encodedLen, false);
ReturnValue_t result =
DleEncoder::encode(&command, 1, currentPosition, remainingLen, &encodedLen, false);
if (result != RETURN_OK) {
return result;
}
currentPosition += encodedLen;
remainingLen -= encodedLen; // DleEncoder will never return encodedLen > remainingLen
result = DleEncoder::encode(&address, 1, currentPosition, remainingLen,
&encodedLen, false);
result = DleEncoder::encode(&address, 1, currentPosition, remainingLen, &encodedLen, false);
if (result != RETURN_OK) {
return result;
}
@ -215,8 +197,8 @@ ReturnValue_t ArduinoComIF::sendMessage(uint8_t command,
temporaryBuffer[0] = dataLen >> 8; // we checked dataLen above
temporaryBuffer[1] = dataLen;
result = DleEncoder::encode(temporaryBuffer, 2, currentPosition,
remainingLen, &encodedLen, false);
result =
DleEncoder::encode(temporaryBuffer, 2, currentPosition, remainingLen, &encodedLen, false);
if (result != RETURN_OK) {
return result;
}
@ -224,8 +206,7 @@ ReturnValue_t ArduinoComIF::sendMessage(uint8_t command,
remainingLen -= encodedLen; // DleEncoder will never return encodedLen > remainingLen
// encoding the actual data
result = DleEncoder::encode(data, dataLen, currentPosition, remainingLen,
&encodedLen, false);
result = DleEncoder::encode(data, dataLen, currentPosition, remainingLen, &encodedLen, false);
if (result != RETURN_OK) {
return result;
}
@ -241,8 +222,8 @@ ReturnValue_t ArduinoComIF::sendMessage(uint8_t command,
temporaryBuffer[0] = crc >> 8;
temporaryBuffer[1] = crc;
result = DleEncoder::encode(temporaryBuffer, 2, currentPosition,
remainingLen, &encodedLen, false);
result =
DleEncoder::encode(temporaryBuffer, 2, currentPosition, remainingLen, &encodedLen, false);
if (result != RETURN_OK) {
return result;
}
@ -279,8 +260,7 @@ void ArduinoComIF::handleSerialPortRx() {
uint8_t dataFromSerial[availableSpace];
ssize_t bytesRead = read(serialPort, dataFromSerial,
sizeof(dataFromSerial));
ssize_t bytesRead = read(serialPort, dataFromSerial, sizeof(dataFromSerial));
if (bytesRead < 0) {
return;
@ -292,13 +272,12 @@ void ArduinoComIF::handleSerialPortRx() {
uint32_t dataLenReceivedSoFar = 0;
rxBuffer.readData(dataReceivedSoFar, sizeof(dataReceivedSoFar), true,
&dataLenReceivedSoFar);
rxBuffer.readData(dataReceivedSoFar, sizeof(dataReceivedSoFar), true, &dataLenReceivedSoFar);
// look for STX
size_t firstSTXinRawData = 0;
while ((firstSTXinRawData < dataLenReceivedSoFar)
&& (dataReceivedSoFar[firstSTXinRawData] != DleEncoder::STX_CHAR)) {
while ((firstSTXinRawData < dataLenReceivedSoFar) &&
(dataReceivedSoFar[firstSTXinRawData] != DleEncoder::STX_CHAR)) {
firstSTXinRawData++;
}
@ -313,10 +292,9 @@ void ArduinoComIF::handleSerialPortRx() {
size_t readSize = 0;
ReturnValue_t result = DleEncoder::decode(
dataReceivedSoFar + firstSTXinRawData,
dataLenReceivedSoFar - firstSTXinRawData, &readSize, packet,
sizeof(packet), &packetLen);
ReturnValue_t result = DleEncoder::decode(dataReceivedSoFar + firstSTXinRawData,
dataLenReceivedSoFar - firstSTXinRawData, &readSize,
packet, sizeof(packet), &packetLen);
size_t toDelete = firstSTXinRawData;
if (result == HasReturnvaluesIF::RETURN_OK) {
@ -333,9 +311,7 @@ void ArduinoComIF::handleSerialPortRx() {
#endif
}
void ArduinoComIF::setBaudrate(uint32_t baudRate) {
this->baudRate = baudRate;
}
void ArduinoComIF::setBaudrate(uint32_t baudRate) { this->baudRate = baudRate; }
void ArduinoComIF::handlePacket(uint8_t *packet, size_t packetLen) {
uint16_t crc = CRC::crc16ccitt(packet, packetLen);
@ -368,8 +344,7 @@ void ArduinoComIF::handlePacket(uint8_t *packet, size_t packetLen) {
}
std::memcpy(cookie.replyBuffer.data(), packet + 4, packetLen - 6);
cookie.receivedDataLen = packetLen - 6;
}
break;
} break;
default:
return;
}

View File

@ -4,8 +4,8 @@
#include <fsfw/container/FixedMap.h>
#include <fsfw/container/SimpleRingBuffer.h>
#include <fsfw/devicehandlers/DeviceCommunicationIF.h>
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
#include <fsfw/objectmanager/SystemObject.h>
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
#include <cstdint>
#include <map>
@ -17,8 +17,7 @@
// Forward declaration, so users don't peek
class ArduinoCookie;
class ArduinoComIF: public SystemObject,
public DeviceCommunicationIF {
class ArduinoComIF : public SystemObject, public DeviceCommunicationIF {
public:
static const uint8_t MAX_NUMBER_OF_SPI_DEVICES = 8;
static const uint8_t MAX_PACKET_SIZE = 64;
@ -34,13 +33,12 @@ public:
/** DeviceCommunicationIF overrides */
virtual ReturnValue_t initializeInterface(CookieIF *cookie) override;
virtual ReturnValue_t sendMessage(CookieIF *cookie,
const uint8_t * sendData, size_t sendLen) override;
virtual ReturnValue_t sendMessage(CookieIF *cookie, const uint8_t *sendData,
size_t sendLen) override;
virtual ReturnValue_t getSendSuccess(CookieIF *cookie) override;
virtual ReturnValue_t requestReceiveMessage(CookieIF *cookie,
size_t requestLen) override;
virtual ReturnValue_t readReceivedMessage(CookieIF *cookie,
uint8_t **buffer, size_t *size) override;
virtual ReturnValue_t requestReceiveMessage(CookieIF *cookie, size_t requestLen) override;
virtual ReturnValue_t readReceivedMessage(CookieIF *cookie, uint8_t **buffer,
size_t *size) override;
private:
#ifdef LINUX
@ -59,8 +57,7 @@ private:
SimpleRingBuffer rxBuffer;
ReturnValue_t sendMessage(uint8_t command, uint8_t address,
const uint8_t *data, size_t dataLen);
ReturnValue_t sendMessage(uint8_t command, uint8_t address, const uint8_t *data, size_t dataLen);
void handleSerialPortRx();
void handlePacket(uint8_t *packet, size_t packetLen);

View File

@ -1,8 +1,8 @@
#include <bsp_hosted/comIF/ArduinoCookie.h>
ArduinoCookie::ArduinoCookie(Protocol_t protocol, uint8_t address,
const size_t maxReplySize) :
protocol(protocol), command(protocol), address(address),
maxReplySize(maxReplySize), replyBuffer(maxReplySize) {
}
ArduinoCookie::ArduinoCookie(Protocol_t protocol, uint8_t address, const size_t maxReplySize)
: protocol(protocol),
command(protocol),
address(address),
maxReplySize(maxReplySize),
replyBuffer(maxReplySize) {}

View File

@ -2,18 +2,14 @@
#define MISSION_ARDUINO_ARDUINOCOOKIE_H_
#include <fsfw/devicehandlers/CookieIF.h>
#include <vector>
class ArduinoCookie : public CookieIF {
public:
enum Protocol_t: uint8_t {
INVALID,
SPI,
I2C
};
enum Protocol_t : uint8_t { INVALID, SPI, I2C };
ArduinoCookie(Protocol_t protocol, uint8_t address,
const size_t maxReplySize);
ArduinoCookie(Protocol_t protocol, uint8_t address, const size_t maxReplySize);
Protocol_t protocol;
uint8_t command;
@ -21,7 +17,6 @@ public:
std::vector<uint8_t> replyBuffer;
size_t receivedDataLen = 0;
size_t maxReplySize;
};
#endif /* MISSION_ARDUINO_ARDUINOCOOKIE_H_ */

View File

@ -1,21 +1,27 @@
target_sources(${TARGET_NAME} PRIVATE
target_sources(${OBSW_NAME} PRIVATE
ipc/MissionMessageTypes.cpp
)
target_include_directories(${TARGET_NAME} PUBLIC
target_include_directories(${OBSW_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
# If a special translation file for object IDs exists, compile it.
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/objects/translateObjects.cpp")
target_sources(${TARGET_NAME} PRIVATE
target_sources(${OBSW_NAME} PRIVATE
objects/translateObjects.cpp
)
target_sources(${UNITTEST_NAME} PRIVATE
objects/translateObjects.cpp
)
endif()
# If a special translation file for events exists, compile it.
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/objects/translateObjects.cpp")
target_sources(${TARGET_NAME} PRIVATE
target_sources(${OBSW_NAME} PRIVATE
events/translateEvents.cpp
)
target_sources(${UNITTEST_NAME} PRIVATE
events/translateEvents.cpp
)
endif()

View File

@ -14,6 +14,12 @@
debugging. */
#define OBSW_VEBOSE_LEVEL 1
#define OBSW_USE_CCSDS_IP_CORE 0
// Set to 1 if all telemetry should be sent to the PTME IP Core
#define OBSW_TM_TO_PTME 0
// Set to 1 if telecommands are received via the PDEC IP Core
#define OBSW_TC_FROM_PDEC 0
#ifdef __cplusplus
#include "objects/systemObjectList.h"

View File

@ -1,8 +1,6 @@
#ifndef FSFWCONFIG_DEVICES_GPIOIDS_H_
#define FSFWCONFIG_DEVICES_GPIOIDS_H_
#include <linux/gpio/GpioIF.h>
namespace gpioIds {
enum gpioId_t {
HEATER_0,
@ -27,33 +25,33 @@ namespace gpioIds {
TEST_ID_0,
TEST_ID_1,
RTD_IC3,
RTD_IC4,
RTD_IC5,
RTD_IC6,
RTD_IC7,
RTD_IC8,
RTD_IC9,
RTD_IC10,
RTD_IC11,
RTD_IC12,
RTD_IC13,
RTD_IC14,
RTD_IC15,
RTD_IC16,
RTD_IC17,
RTD_IC18,
RTD_IC_3,
RTD_IC_4,
RTD_IC_5,
RTD_IC_6,
RTD_IC_7,
RTD_IC_8,
RTD_IC_9,
RTD_IC_10,
RTD_IC_11,
RTD_IC_12,
RTD_IC_13,
RTD_IC_14,
RTD_IC_15,
RTD_IC_16,
RTD_IC_17,
RTD_IC_18,
SPI_MUX_BIT_1,
SPI_MUX_BIT_2,
SPI_MUX_BIT_3,
SPI_MUX_BIT_4,
SPI_MUX_BIT_5,
SPI_MUX_BIT_6
SPI_MUX_BIT_6,
CS_RAD_SENSOR,
ENABLE_RADFET
};
}
#endif /* FSFWCONFIG_DEVICES_GPIOIDS_H_ */

View File

@ -52,7 +52,6 @@ namespace pcduSwitches {
static const uint8_t INIT_STATE_SOLAR_CELL_EXP = OFF;
static const uint8_t INIT_STATE_PLOC = OFF;
static const uint8_t INIT_STATE_ACS_BOARD_SIDE_A = OFF;
}
} // namespace pcduSwitches
#endif /* FSFWCONFIG_DEVICES_POWERSWITCHERLIST_H_ */

View File

@ -2,6 +2,7 @@
#define CONFIG_EVENTS_SUBSYSTEMIDRANGES_H_
#include <common/config/commonSubsystemIds.h>
#include <cstdint>
/**
@ -9,9 +10,7 @@
* Numbers 0-80 are reserved for FSFW Subsystem IDs (framework/events/)
*/
namespace SUBSYSTEM_ID {
enum: uint8_t {
SUBSYSTEM_ID_START = COMMON_SUBSYSTEM_ID_END
};
enum : uint8_t { SUBSYSTEM_ID_START = COMMON_SUBSYSTEM_ID_END };
}
#endif /* CONFIG_EVENTS_SUBSYSTEMIDRANGES_H_ */

View File

@ -1,7 +0,0 @@
CXXSRC += $(wildcard $(CURRENTPATH)/cdatapool/*.cpp)
CXXSRC += $(wildcard $(CURRENTPATH)/ipc/*.cpp)
CXXSRC += $(wildcard $(CURRENTPATH)/objects/*.cpp)
CXXSRC += $(wildcard $(CURRENTPATH)/pollingsequence/*.cpp)
CXXSRC += $(wildcard $(CURRENTPATH)/events/*.cpp)
INCLUDES += $(CURRENTPATH)

View File

@ -1,4 +1,5 @@
#include "MissionMessageTypes.h"
#include <fsfw/ipc/CommandMessage.h>
void messagetypes::clearMissionMessage(CommandMessage* message) {
@ -7,5 +8,3 @@ void messagetypes::clearMissionMessage(CommandMessage* message) {
break;
}
}

View File

@ -17,6 +17,6 @@ enum MESSAGE_TYPE {
};
void clearMissionMessage(CommandMessage* message);
}
} // namespace messagetypes
#endif /* CONFIG_IPC_MISSIONMESSAGETYPES_H_ */

View File

@ -1,9 +1,10 @@
#ifndef HOSTED_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_
#define HOSTED_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_
#include <cstdint>
#include <commonObjects.h>
#include <cstdint>
// The objects will be instantiated in the ID order
namespace objects {
enum sourceObjects : uint32_t {

View File

@ -1,9 +1,10 @@
#ifndef CONFIG_RETURNVALUES_CLASSIDS_H_
#define CONFIG_RETURNVALUES_CLASSIDS_H_
#include "commonClassIds.h"
#include <fsfw/returnvalues/FwClassIds.h>
#include "commonClassIds.h"
/**
* Source IDs starts at 73 for now
* Framework IDs for ReturnValues run from 0 to 56
@ -15,5 +16,4 @@ enum {
};
}
#endif /* CONFIG_RETURNVALUES_CLASSIDS_H_ */

View File

@ -15,5 +15,4 @@ namespace apid {
static const uint16_t EIVE_OBSW = 0x65;
}
#endif /* FSFWCONFIG_TMTC_APID_H_ */

View File

@ -1,10 +1,9 @@
#include <iostream>
#include "InitMission.h"
#include "OBSWVersion.h"
#include "fsfw/FSFWVersion.h"
#include "fsfw/tasks/TaskFactory.h"
#include <iostream>
#ifdef WIN32
static const char* COMPILE_PRINTOUT = "Windows";
#elif LINUX
@ -17,13 +16,12 @@ static const char* COMPILE_PRINTOUT = "unknown OS";
* Linux and Windows.
* @return
*/
int main(void)
{
int main(void) {
std::cout << "-- EIVE OBSW --" << std::endl;
std::cout << "-- Compiled for " << COMPILE_PRINTOUT << " --" << std::endl;
std::cout << "-- OBSW " << SW_NAME << " v" << SW_VERSION << "." << SW_SUBVERSION <<
"." << SW_REVISION << ", FSFW v" << FSFW_VERSION << "." << FSFW_SUBVERSION << "." <<
FSFW_REVISION << "--" << std::endl;
std::cout << "-- OBSW " << SW_NAME << " v" << SW_VERSION << "." << SW_SUBVERSION << "."
<< SW_REVISION << ", FSFW v" << FSFW_VERSION << "." << FSFW_SUBVERSION << "."
<< FSFW_REVISION << "--" << std::endl;
std::cout << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl;
initmission::initMission();
@ -33,5 +31,3 @@ int main(void)
TaskFactory::delayTask(5000);
}
}

View File

@ -1,4 +1,4 @@
target_sources(${TARGET_NAME} PUBLIC
target_sources(${OBSW_NAME} PUBLIC
InitMission.cpp
main.cpp
ObjectFactory.cpp

View File

@ -1,21 +1,21 @@
#include "InitMission.h"
#include "ObjectFactory.h"
#include "objects/systemObjectList.h"
#include "OBSWConfig.h"
#include "pollingsequence/pollingSequenceFactory.h"
#include <mission/utility/InitMission.h>
#include <fsfw/objectmanager/ObjectManager.h>
#include <fsfw/objectmanager/ObjectManagerIF.h>
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
#include <fsfw/serviceinterface/ServiceInterface.h>
#include <fsfw/objectmanager/ObjectManager.h>
#include <fsfw/tasks/FixedTimeslotTaskIF.h>
#include <fsfw/tasks/PeriodicTaskIF.h>
#include <fsfw/tasks/TaskFactory.h>
#include <mission/utility/InitMission.h>
#include <iostream>
#include "OBSWConfig.h"
#include "ObjectFactory.h"
#include "objects/systemObjectList.h"
#include "pollingsequence/pollingSequenceFactory.h"
ServiceInterfaceStream sif::debug("DEBUG");
ServiceInterfaceStream sif::info("INFO");
ServiceInterfaceStream sif::warning("WARNING");
@ -47,7 +47,6 @@ void initmission::initTasks() {
void (*missedDeadlineFunc)(void) = nullptr;
#endif
/* TMTC Distribution */
PeriodicTaskIF* tmTcDistributor = factory->createPeriodicTask(
"DIST", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
@ -65,17 +64,17 @@ void initmission::initTasks() {
}
/* UDP bridge */
PeriodicTaskIF* udpBridgeTask = factory->createPeriodicTask(
"UDP_UNIX_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
result = udpBridgeTask->addComponent(objects::TMTC_BRIDGE);
PeriodicTaskIF* tmtcBridgeTask = factory->createPeriodicTask(
"TMTC_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
result = tmtcBridgeTask->addComponent(objects::TMTC_BRIDGE);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "Add component UDP Unix Bridge failed" << std::endl;
sif::error << "Add component TMTC Bridge failed" << std::endl;
}
PeriodicTaskIF* udpPollingTask = factory->createPeriodicTask(
"UDP_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
result = udpPollingTask->addComponent(objects::TMTC_POLLING_TASK);
PeriodicTaskIF* tmtcPollingTask = factory->createPeriodicTask(
"TMTC_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
result = tmtcPollingTask->addComponent(objects::TMTC_POLLING_TASK);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "Add component UDP Polling failed" << std::endl;
sif::error << "Add component TMTC Polling failed" << std::endl;
}
/* PUS Services */
@ -93,8 +92,7 @@ void initmission::initTasks() {
for (const auto& task : taskVector) {
if (task != nullptr) {
task->startTask();
}
else {
} else {
sif::error << "Task in vector " << name << " is invalid!" << std::endl;
}
}
@ -102,8 +100,8 @@ void initmission::initTasks() {
sif::info << "Starting tasks.." << std::endl;
tmTcDistributor->startTask();
udpBridgeTask->startTask();
udpPollingTask->startTask();
tmtcBridgeTask->startTask();
tmtcPollingTask->startTask();
taskStarter(pusTasks, "PUS Tasks");
#if OBSW_ADD_TEST_CODE == 1
@ -120,7 +118,8 @@ void initmission::initTasks() {
}
void initmission::createPusTasks(TaskFactory& factory,
TaskDeadlineMissedFunction missedDeadlineFunc, std::vector<PeriodicTaskIF*>& taskVec) {
TaskDeadlineMissedFunction missedDeadlineFunc,
std::vector<PeriodicTaskIF*>& taskVec) {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
PeriodicTaskIF* pusVerification = factory.createPeriodicTask(
"PUS_VERIF", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
@ -182,19 +181,18 @@ void initmission::createPusTasks(TaskFactory& factory,
}
result = pusLowPrio->addComponent(objects::INTERNAL_ERROR_REPORTER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("INT_ERR_RPRT",
objects::INTERNAL_ERROR_REPORTER);
initmission::printAddObjectError("INT_ERR_RPRT", objects::INTERNAL_ERROR_REPORTER);
}
taskVec.push_back(pusLowPrio);
}
void initmission::createPstTasks(TaskFactory& factory,
TaskDeadlineMissedFunction missedDeadlineFunc, std::vector<PeriodicTaskIF*> &taskVec) {
TaskDeadlineMissedFunction missedDeadlineFunc,
std::vector<PeriodicTaskIF*>& taskVec) {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
#if OBSW_ADD_SPI_TEST_CODE == 0
FixedTimeslotTaskIF* spiPst = factory.createFixedTimeslotTask(
"SPI_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 3.0,
missedDeadlineFunc);
"SPI_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 3.0, missedDeadlineFunc);
result = pst::pstSpi(spiPst);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl;
@ -213,7 +211,7 @@ void initmission::createTestTasks(TaskFactory& factory,
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("TEST_TASK", objects::TEST_TASK);
}
#if RPI_ADD_SPI_TEST == 1
#if OBSW_ADD_SPI_TEST_CODE == 1
result = testTask->addComponent(objects::SPI_TEST);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("SPI_TEST", objects::SPI_TEST);
@ -225,23 +223,23 @@ void initmission::createTestTasks(TaskFactory& factory,
initmission::printAddObjectError("GPIOD_TEST", objects::LIBGPIOD_TEST);
}
#endif /* RPI_ADD_GPIO_TEST == 1 */
#if RPI_ADD_UART_TEST == 1
#if OBSW_ADD_UART_TEST_CODE == 1
result = testTask->addComponent(objects::UART_TEST);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("UART_TEST", objects::UART_TEST);
}
#endif /* RPI_ADD_GPIO_TEST == 1 */
taskVec.push_back(testTask);
bool startTestPst = true;
static_cast<void>(startTestPst);
#if OBSW_ADD_TEST_PST == 1
FixedTimeslotTaskIF* pstTestTask = factory->createFixedTimeslotTask("TEST_PST", 50,
PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 2.0, missedDeadlineFunc);
FixedTimeslotTaskIF* pstTestTask = factory->createFixedTimeslotTask(
"TEST_PST", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 2.0, missedDeadlineFunc);
result = pst::pstTest(pstTestTask);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::info << "initmission::initTasks: ACS PST empty or invalid" << std::endl;
startTestPst = false;
}
#endif /* RPI_TEST_ACS_BOARD == 1 */
}

View File

@ -1,9 +1,10 @@
#ifndef BSP_LINUX_INITMISSION_H_
#define BSP_LINUX_INITMISSION_H_
#include "fsfw/tasks/Typedef.h"
#include <vector>
#include "fsfw/tasks/Typedef.h"
class PeriodicTaskIF;
class TaskFactory;
@ -11,14 +12,12 @@ namespace initmission {
void initMission();
void initTasks();
void createPstTasks(TaskFactory& factory,
TaskDeadlineMissedFunction missedDeadlineFunc,
void createPstTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
std::vector<PeriodicTaskIF*>& taskVec);
void createTestTasks(TaskFactory& factory,
TaskDeadlineMissedFunction missedDeadlineFunc,
void createTestTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
std::vector<PeriodicTaskIF*>& taskVec);
void createPusTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
std::vector<PeriodicTaskIF*>& taskVec);
};
}; // namespace initmission
#endif /* BSP_LINUX_INITMISSION_H_ */

View File

@ -1,47 +1,46 @@
#include <devConf.h>
#include "ObjectFactory.h"
#include "objects/systemObjectList.h"
#include "OBSWConfig.h"
#include "devConf.h"
#include "devices/addresses.h"
#include "devices/gpioIds.h"
#include "OBSWConfig.h"
#include "tmtc/apid.h"
#include "tmtc/pusIds.h"
#include "fsfw/datapoollocal/LocalDataPoolManager.h"
#include "fsfw/tasks/TaskFactory.h"
#include "fsfw/tmtcpacket/pus/tm.h"
#include "fsfw/tmtcservices/CommandingServiceBase.h"
#include "fsfw/tmtcservices/PusServiceBase.h"
#include "linux/boardtest/LibgpiodTest.h"
#include "linux/boardtest/SpiTestClass.h"
#include "linux/boardtest/UartTestClass.h"
#include "mission/core/GenericFactory.h"
#include "mission/devices/GPSHyperionHandler.h"
#include "mission/devices/GyroADIS1650XHandler.h"
#include "mission/utility/TmFunnel.h"
#include <mission/devices/GPSHyperionHandler.h>
#include "mission/devices/GyroADIS16507Handler.h"
#include "fsfw/datapoollocal/LocalDataPoolManager.h"
#include "fsfw/tmtcservices/CommandingServiceBase.h"
#include "fsfw/tmtcservices/PusServiceBase.h"
#include "fsfw/tmtcpacket/pus/tm.h"
#include "fsfw/tasks/TaskFactory.h"
#include "objects/systemObjectList.h"
#include "tmtc/apid.h"
#include "tmtc/pusIds.h"
/* UDP server includes */
#if OBSW_USE_TMTC_TCP_BRIDGE == 1
#include <fsfw/src/fsfw/osal/common/TcpTmTcBridge.h>
#include <fsfw/src/fsfw/osal/common/TcpTmTcServer.h>
#else
#include "fsfw/osal/common/UdpTmTcBridge.h"
#include "fsfw/osal/common/UdpTcPollingTask.h"
#include "fsfw/osal/common/UdpTmTcBridge.h"
#endif
#include "fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h"
#include "fsfw_hal/devicehandlers/MgmRM3100Handler.h"
#include "fsfw_hal/devicehandlers/GyroL3GD20Handler.h"
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
#include "fsfw_hal/linux/rpi/GpioRPi.h"
#include "fsfw_hal/common/gpio/GpioCookie.h"
#include "fsfw_hal/linux/spi/SpiCookie.h"
#include "fsfw_hal/linux/spi/SpiComIF.h"
#include <fsfw_hal/linux/uart/UartComIF.h>
#include <fsfw_hal/linux/uart/UartCookie.h>
#include "fsfw_hal/common/gpio/GpioCookie.h"
#include "fsfw_hal/devicehandlers/GyroL3GD20Handler.h"
#include "fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h"
#include "fsfw_hal/devicehandlers/MgmRM3100Handler.h"
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
#include "fsfw_hal/linux/rpi/GpioRPi.h"
#include "fsfw_hal/linux/spi/SpiComIF.h"
#include "fsfw_hal/linux/spi/SpiCookie.h"
void Factory::setStaticFrameworkObjectIds() {
PusServiceBase::packetSource = objects::PUS_PACKET_DISTRIBUTOR;
PusServiceBase::packetDestination = objects::TM_FUNNEL;
@ -57,22 +56,10 @@ void Factory::setStaticFrameworkObjectIds() {
TmPacketBase::timeStamperId = objects::TIME_STAMPER;
}
void ObjectFactory::produce(void* args) {
Factory::setStaticFrameworkObjectIds();
ObjectFactory::produceGenericObjects();
#if OBSW_USE_TMTC_TCP_BRIDGE == 1
auto tmtcBridge = new TcpTmTcBridge(objects::TMTC_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR);
tmtcBridge->setMaxNumberOfPacketsStored(50);
new TcpTmTcServer(objects::TMTC_POLLING_TASK, objects::TMTC_BRIDGE);
#else
auto tmtcBridge = new UdpTmTcBridge(objects::TMTC_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR);
tmtcBridge->setMaxNumberOfPacketsStored(50);
new UdpTcPollingTask(objects::TMTC_POLLING_TASK, objects::TMTC_BRIDGE);
#endif
GpioIF* gpioIF = new LinuxLibgpioIF(objects::GPIO_IF);
GpioCookie* gpioCookie = nullptr;
static_cast<void>(gpioCookie);
@ -88,85 +75,93 @@ void ObjectFactory::produce(void* args){
gpioCookie = new GpioCookie();
}
// TODO: Missing pin for Gyro 2
gpio::createRpiGpioConfig(gpioCookie, gpioIds::MGM_0_LIS3_CS, gpio::MGM_0_BCM_PIN,
"MGM_0_LIS3", gpio::Direction::OUT, 1);
gpio::createRpiGpioConfig(gpioCookie, gpioIds::MGM_0_LIS3_CS, gpio::MGM_0_BCM_PIN, "MGM_0_LIS3",
gpio::Direction::OUT, 1);
gpio::createRpiGpioConfig(gpioCookie, gpioIds::MGM_1_RM3100_CS, gpio::MGM_1_BCM_PIN,
"MGM_1_RM3100", gpio::Direction::OUT, 1);
gpio::createRpiGpioConfig(gpioCookie, gpioIds::MGM_2_LIS3_CS, gpio::MGM_2_BCM_PIN,
"MGM_2_LIS3", gpio::Direction::OUT, 1);
gpio::createRpiGpioConfig(gpioCookie, gpioIds::MGM_2_LIS3_CS, gpio::MGM_2_BCM_PIN, "MGM_2_LIS3",
gpio::Direction::OUT, 1);
gpio::createRpiGpioConfig(gpioCookie, gpioIds::MGM_3_RM3100_CS, gpio::MGM_3_BCM_PIN,
"MGM_3_RM3100", gpio::Direction::OUT, 1);
gpio::createRpiGpioConfig(gpioCookie, gpioIds::GYRO_0_ADIS_CS, gpio::GYRO_0_BCM_PIN,
"GYRO_0_ADIS", gpio::Direction::OUT, 1);
gpio::createRpiGpioConfig(gpioCookie, gpioIds::GYRO_1_L3G_CS, gpio::GYRO_1_BCM_PIN,
"GYRO_1_L3G", gpio::Direction::OUT, 1);
gpio::createRpiGpioConfig(gpioCookie, gpioIds::GYRO_1_L3G_CS, gpio::GYRO_1_BCM_PIN, "GYRO_1_L3G",
gpio::Direction::OUT, 1);
gpio::createRpiGpioConfig(gpioCookie, gpioIds::GYRO_2_ADIS_CS, gpio::GYRO_2_BCM_PIN,
"GYRO_2_ADIS", gpio::Direction::OUT, 1);
gpio::createRpiGpioConfig(gpioCookie, gpioIds::GYRO_3_L3G_CS, gpio::GYRO_3_BCM_PIN,
"GYRO_3_L3G", gpio::Direction::OUT, 1);
gpio::createRpiGpioConfig(gpioCookie, gpioIds::GYRO_3_L3G_CS, gpio::GYRO_3_BCM_PIN, "GYRO_3_L3G",
gpio::Direction::OUT, 1);
gpioIF->addGpios(gpioCookie);
spiDev = "/dev/spidev0.1";
spiCookie = new SpiCookie(addresses::MGM_0_LIS3, gpioIds::MGM_0_LIS3_CS, spiDev,
spiCookie =
new SpiCookie(addresses::MGM_0_LIS3, gpioIds::MGM_0_LIS3_CS, spiDev,
MGMLIS3MDL::MAX_BUFFER_SIZE, spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
auto mgmLis3Handler = new MgmLIS3MDLHandler(objects::MGM_0_LIS3_HANDLER,
objects::SPI_COM_IF, spiCookie, 0);
auto mgmLis3Handler =
new MgmLIS3MDLHandler(objects::MGM_0_LIS3_HANDLER, objects::SPI_COM_IF, spiCookie, 0);
mgmLis3Handler->setStartUpImmediately();
#if FSFW_HAL_LIS3MDL_MGM_DEBUG == 1
mgmLis3Handler->setToGoToNormalMode(true);
#endif
spiCookie = new SpiCookie(addresses::MGM_1_RM3100, gpioIds::MGM_1_RM3100_CS, spiDev,
spiCookie =
new SpiCookie(addresses::MGM_1_RM3100, gpioIds::MGM_1_RM3100_CS, spiDev,
RM3100::MAX_BUFFER_SIZE, spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
auto mgmRm3100Handler = new MgmRM3100Handler(objects::MGM_1_RM3100_HANDLER,
objects::SPI_COM_IF, spiCookie, 0);
auto mgmRm3100Handler =
new MgmRM3100Handler(objects::MGM_1_RM3100_HANDLER, objects::SPI_COM_IF, spiCookie, 0);
mgmRm3100Handler->setStartUpImmediately();
#if FSFW_HAL_RM3100_MGM_DEBUG == 1
mgmRm3100Handler->setToGoToNormalMode(true);
#endif
spiCookie = new SpiCookie(addresses::MGM_2_LIS3, gpioIds::MGM_2_LIS3_CS, spiDev,
spiCookie =
new SpiCookie(addresses::MGM_2_LIS3, gpioIds::MGM_2_LIS3_CS, spiDev,
MGMLIS3MDL::MAX_BUFFER_SIZE, spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
mgmLis3Handler = new MgmLIS3MDLHandler(objects::MGM_2_LIS3_HANDLER,
objects::SPI_COM_IF, spiCookie, 0);
mgmLis3Handler =
new MgmLIS3MDLHandler(objects::MGM_2_LIS3_HANDLER, objects::SPI_COM_IF, spiCookie, 0);
mgmLis3Handler->setStartUpImmediately();
#if FSFW_HAL_LIS3MDL_MGM_DEBUG == 1
mgmLis3Handler->setToGoToNormalMode(true);
#endif
spiCookie = new SpiCookie(addresses::MGM_3_RM3100, gpioIds::MGM_3_RM3100_CS, spiDev,
spiCookie =
new SpiCookie(addresses::MGM_3_RM3100, gpioIds::MGM_3_RM3100_CS, spiDev,
RM3100::MAX_BUFFER_SIZE, spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
mgmRm3100Handler = new MgmRM3100Handler(objects::MGM_3_RM3100_HANDLER,
objects::SPI_COM_IF, spiCookie, 0);
mgmRm3100Handler =
new MgmRM3100Handler(objects::MGM_3_RM3100_HANDLER, objects::SPI_COM_IF, spiCookie, 0);
mgmRm3100Handler->setStartUpImmediately();
#if FSFW_HAL_RM3100_MGM_DEBUG == 1
mgmRm3100Handler->setToGoToNormalMode(true);
#endif
spiCookie = new SpiCookie(addresses::GYRO_0_ADIS, gpioIds::GYRO_0_ADIS_CS, spiDev,
spiCookie =
new SpiCookie(addresses::GYRO_0_ADIS, gpioIds::GYRO_0_ADIS_CS, spiDev,
ADIS16507::MAXIMUM_REPLY_SIZE, spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
auto adisHandler = new GyroADIS16507Handler(objects::GYRO_0_ADIS_HANDLER, objects::SPI_COM_IF,
spiCookie);
auto adisHandler =
new GyroADIS16507Handler(objects::GYRO_0_ADIS_HANDLER, objects::SPI_COM_IF, spiCookie);
adisHandler->setStartUpImmediately();
spiCookie = new SpiCookie(addresses::GYRO_1_L3G, gpioIds::GYRO_1_L3G_CS, spiDev,
L3GD20H::MAX_BUFFER_SIZE, spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
auto gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_1_L3G_HANDLER, objects::SPI_COM_IF,
spiCookie, 0);
spiCookie =
new SpiCookie(addresses::GYRO_1_L3G, gpioIds::GYRO_1_L3G_CS, spiDev, L3GD20H::MAX_BUFFER_SIZE,
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
auto gyroL3gHandler =
new GyroHandlerL3GD20H(objects::GYRO_1_L3G_HANDLER, objects::SPI_COM_IF, spiCookie, 0);
gyroL3gHandler->setStartUpImmediately();
#if FSFW_HAL_L3GD20_GYRO_DEBUG == 1
gyroL3gHandler->setToGoToNormalMode(true);
#endif
spiCookie = new SpiCookie(addresses::GYRO_2_ADIS, gpioIds::GYRO_2_ADIS_CS, spiDev,
spiCookie =
new SpiCookie(addresses::GYRO_2_ADIS, gpioIds::GYRO_2_ADIS_CS, spiDev,
ADIS16507::MAXIMUM_REPLY_SIZE, spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
adisHandler = new GyroADIS16507Handler(objects::GYRO_2_ADIS_HANDLER, objects::SPI_COM_IF,
spiCookie);
adisHandler =
new GyroADIS16507Handler(objects::GYRO_2_ADIS_HANDLER, objects::SPI_COM_IF, spiCookie);
adisHandler->setStartUpImmediately();
spiCookie = new SpiCookie(addresses::GYRO_3_L3G, gpioIds::GYRO_3_L3G_CS, spiDev,
L3GD20H::MAX_BUFFER_SIZE, spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_3_L3G_HANDLER, objects::SPI_COM_IF,
spiCookie, 0);
spiCookie =
new SpiCookie(addresses::GYRO_3_L3G, gpioIds::GYRO_3_L3G_CS, spiDev, L3GD20H::MAX_BUFFER_SIZE,
spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
gyroL3gHandler =
new GyroHandlerL3GD20H(objects::GYRO_3_L3G_HANDLER, objects::SPI_COM_IF, spiCookie, 0);
gyroL3gHandler->setStartUpImmediately();
#if FSFW_HAL_L3GD20_GYRO_DEBUG == 1
gyroL3gHandler->setToGoToNormalMode(true);
@ -180,14 +175,13 @@ void ObjectFactory::produce(void* args){
}
void ObjectFactory::createTestTasks() {
new TestTask(objects::TEST_TASK);
#if RPI_ADD_SPI_TEST == 1
#if OBSW_ADD_SPI_TEST_CODE == 1
new SpiTestClass(objects::SPI_TEST, gpioIF);
#endif
#if RPI_ADD_UART_TEST == 1
#if OBSW_ADD_UART_TEST_CODE == 1
new UartTestClass(objects::UART_TEST);
#else
new UartComIF(objects::UART_COM_IF);
@ -217,20 +211,20 @@ void ObjectFactory::createTestTasks() {
spiDev = "/dev/spidev0.1";
spiCookie = new SpiCookie(addresses::GYRO_0_ADIS, gpioIds::GYRO_0_ADIS_CS, spiDev,
ADIS16507::MAXIMUM_REPLY_SIZE, spi::DEFAULT_ADIS16507_MODE, spi::DEFAULT_ADIS16507_SPEED,
nullptr, nullptr);
auto adisGyroHandler = new GyroADIS16507Handler(objects::GYRO_0_ADIS_HANDLER, objects::SPI_COM_IF, spiCookie);
ADIS16507::MAXIMUM_REPLY_SIZE, spi::DEFAULT_ADIS16507_MODE,
spi::DEFAULT_ADIS16507_SPEED, nullptr, nullptr);
auto adisGyroHandler =
new GyroADIS16507Handler(objects::GYRO_0_ADIS_HANDLER, objects::SPI_COM_IF, spiCookie);
adisGyroHandler->setStartUpImmediately();
#endif /* RPI_TEST_ADIS16507 == 1 */
#if RPI_TEST_GPS_HANDLER == 1
UartCookie* uartCookie = new UartCookie(objects::GPS0_HANDLER, "/dev/serial0",
UartModes::CANONICAL, 9600, 1024);
UartCookie* uartCookie =
new UartCookie(objects::GPS0_HANDLER, "/dev/serial0", UartModes::CANONICAL, 9600, 1024);
uartCookie->setToFlushInput(true);
uartCookie->setReadCycles(6);
GPSHyperionHandler* gpsHandler = new GPSHyperionHandler(objects::GPS0_HANDLER,
objects::UART_COM_IF, uartCookie, false);
GPSHyperionHandler* gpsHandler =
new GPSHyperionHandler(objects::GPS0_HANDLER, objects::UART_COM_IF, uartCookie, false);
gpsHandler->setStartUpImmediately();
#endif
}

View File

@ -1,12 +1,11 @@
#ifndef BSP_LINUX_OBJECTFACTORY_H_
#define BSP_LINUX_OBJECTFACTORY_H_
namespace ObjectFactory {
void setStatics();
void produce(void* args);
void createTestTasks();
};
}; // namespace ObjectFactory
#endif /* BSP_LINUX_OBJECTFACTORY_H_ */

View File

@ -1,7 +1,7 @@
target_sources(${TARGET_NAME} PRIVATE
target_sources(${OBSW_NAME} PRIVATE
print.c
)
target_include_directories(${TARGET_NAME} PUBLIC
target_include_directories(${OBSW_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)

View File

@ -7,7 +7,8 @@ extern "C" void __gcov_flush();
#else
void __gcov_flush() {
sif::info << "GCC GCOV: Please supply GCOV=1 in Makefile if "
"coverage information is desired.\n" << std::flush;
"coverage information is desired.\n"
<< std::flush;
}
#endif

View File

@ -1,4 +1,4 @@
#include <bsp_q7s/boardconfig/print.h>
#include <bsp_linux_board/boardconfig/print.h>
#include <stdio.h>
void printChar(const char* character, bool errStream) {
@ -8,7 +8,3 @@ void printChar(const char* character, bool errStream) {
}
putc(*character, stdout);
}

View File

@ -1,4 +1,4 @@
target_sources(${TARGET_NAME} PRIVATE
target_sources(${OBSW_NAME} PRIVATE
)

View File

@ -1,12 +1,11 @@
#include <iostream>
#include "InitMission.h"
#include "OBSWConfig.h"
#include "OBSWVersion.h"
#include "fsfw/FSFWVersion.h"
#include "fsfw/tasks/TaskFactory.h"
#include <iostream>
#ifdef RASPBERRY_PI
static const char* const BOARD_NAME = "Raspberry Pi";
#elif defined(BEAGLEBONEBLACK)
@ -19,13 +18,12 @@ static const char* const BOARD_NAME = "Unknown Board";
* @brief This is the main program and entry point for the Raspberry Pi.
* @return
*/
int main(void)
{
int main(void) {
std::cout << "-- EIVE OBSW --" << std::endl;
std::cout << "-- Compiled for Linux board " << BOARD_NAME << " --" << std::endl;
std::cout << "-- OBSW " << SW_NAME << " v" << SW_VERSION << "." << SW_SUBVERSION <<
"." << SW_REVISION << ", FSFW v" << FSFW_VERSION << "." << FSFW_SUBVERSION <<
FSFW_REVISION << "--" << std::endl;
std::cout << "-- OBSW " << SW_NAME << " v" << SW_VERSION << "." << SW_SUBVERSION << "."
<< SW_REVISION << ", FSFW v" << FSFW_VERSION << "." << FSFW_SUBVERSION << FSFW_REVISION
<< "--" << std::endl;
std::cout << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl;
initmission::initMission();
@ -35,5 +33,3 @@ int main(void)
TaskFactory::delayTask(5000);
}
}

View File

@ -1,17 +1,25 @@
target_sources(${TARGET_NAME} PUBLIC
#simple mode
add_executable(${SIMPLE_OBSW_NAME} EXCLUDE_FROM_ALL)
target_compile_definitions(${SIMPLE_OBSW_NAME} PRIVATE "Q7S_SIMPLE_MODE")
target_sources(${SIMPLE_OBSW_NAME} PUBLIC
main.cpp
)
#I think this is unintentional? (produces linker errors for stuff in /linux)
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
)
add_subdirectory(boardtest)
if(Q7S_SIMPLE_MODE)
add_subdirectory(simple)
else()
add_subdirectory(boardconfig)
add_subdirectory(comIF)
add_subdirectory(gpio)
add_subdirectory(core)
add_subdirectory(memory)
add_subdirectory(callbacks)
add_subdirectory(devices)
endif()

View File

@ -1,7 +1,12 @@
target_sources(${TARGET_NAME} PRIVATE
target_sources(${OBSW_NAME} PRIVATE
print.c
)
target_include_directories(${TARGET_NAME} PUBLIC
target_sources(${SIMPLE_OBSW_NAME} PRIVATE
print.c
)
target_include_directories(${OBSW_NAME} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)

View File

@ -3,98 +3,98 @@
namespace q7s {
static constexpr char SPI_DEFAULT_DEV[] = "/dev/spidev2.0";
static constexpr char SPI_RW_DEV[] = "/dev/spidev3.0";
static constexpr char SPI_DEFAULT_DEV[] = "/dev/spi-main";
static constexpr char SPI_RW_DEV[] = "/dev/spi-rw";
static constexpr char I2C_DEFAULT_DEV[] = "/dev/i2c-1";
static constexpr char I2C_DEFAULT_DEV[] = "/dev/i2c-eive";
static constexpr char UART_PLOC_MPSOC_DEV[] = "/dev/ttyUL3";
static constexpr char UART_PLOC_SUPERVSIOR_DEV[] = "/dev/ttyUL4";
static constexpr char UART_SYRLINKS_DEV[] = "/dev/ttyUL5";
static constexpr char UART_STAR_TRACKER_DEV[] = "/dev/ttyUL8";
static constexpr char UART_GNSS_DEV[] = "/dev/ul-gps";
static constexpr char UART_PLOC_MPSOC_DEV[] = "/dev/ul-plmpsoc";
static constexpr char UART_PLOC_SUPERVSIOR_DEV[] = "/dev/ul-plsv";
static constexpr char UART_SYRLINKS_DEV[] = "/dev/ul-syrlinks";
static constexpr char UART_STAR_TRACKER_DEV[] = "/dev/ul-str";
static constexpr char UART_GNSS_0_DEV[] = "/dev/ttyUL0";
static constexpr char UART_GNSS_1_DEV[] = "/dev/ttyUL2";
static constexpr char UIO_PDEC_REGISTERS[] = "/dev/uio0";
static constexpr char UIO_PDEC_CONFIG_MEMORY[] = "/dev/uio2";
static constexpr char UIO_PDEC_RAM[] = "/dev/uio3";
static constexpr char UIO_PTME[] = "/dev/uio1";
static constexpr int MAP_ID_PTME_CONFIG = 3;
/**************************************************************/
/** OBC1E */
/**************************************************************/
static constexpr char GPIO_MULTIPURPOSE_1V8_OBC1D[] = "/amba_pl/gpio@42020000";
static const char* const GPIO_GYRO_ADIS_LABEL = GPIO_MULTIPURPOSE_1V8_OBC1D;
static constexpr uint32_t GPIO_GYRO_0_ADIS_CS = 0; // Package Pin: W20
static constexpr uint32_t GPIO_GYRO_2_ADIS_CS = 2; // AA22
namespace uiomapids {
static const int PTME_VC0 = 0;
static const int PTME_VC1 = 1;
static const int PTME_VC2 = 2;
static const int PTME_VC3 = 3;
static const int PTME_CONFIG = 4;
} // namespace uiomapids
/**************************************************************/
/** OBC1F B0 */
/**************************************************************/
static constexpr char GPIO_FLEX_OBC1F_B0[] = "/amba_pl/gpio@42030000";
static constexpr uint32_t GPIO_FLEX_OBC1F_B0_WIDTH = 20;
static const char* const GPIO_ACS_BOARD_DEFAULT_LABEL = GPIO_FLEX_OBC1F_B0;
static const char* const GPIO_RW_DEFAULT_LABEL = GPIO_FLEX_OBC1F_B0;
static const char* const GPIO_RAD_SENSOR_LABEL = GPIO_FLEX_OBC1F_B0;
namespace gpioNames {
static constexpr char GYRO_0_ADIS_CS[] = "gyro_0_adis_chip_select";
static constexpr char GYRO_1_L3G_CS[] = "gyro_1_l3g_chip_select";
static constexpr char GYRO_2_ADIS_CS[] = "gyro_2_adis_chip_select";
static constexpr char GYRO_3_L3G_CS[] = "gyro_3_l3g_chip_select";
static constexpr char MGM_0_CS[] = "mgm_0_lis3_chip_select";
static constexpr char MGM_1_CS[] = "mgm_1_rm3100_chip_select";
static constexpr char MGM_2_CS[] = "mgm_2_lis3_chip_select";
static constexpr char MGM_3_CS[] = "mgm_3_rm3100_chip_select";
static constexpr char RESET_GNSS_0[] = "reset_gnss_0";
static constexpr char RESET_GNSS_1[] = "reset_gnss_1";
static constexpr char GNSS_0_ENABLE[] = "enable_gnss_0";
static constexpr char GNSS_1_ENABLE[] = "enable_gnss_1";
static constexpr char GYRO_0_ENABLE[] = "enable_gyro_0";
static constexpr char GYRO_2_ENABLE[] = "enable_gyro_2";
static constexpr char GNSS_SELECT[] = "gnss_mux_select";
static constexpr char GNSS_MUX_SELECT[] = "gnss_mux_select";
static constexpr uint32_t GPIO_RW_0_CS = 7; // B20
static constexpr uint32_t GPIO_RW_1_CS = 3; // G22
static constexpr uint32_t GPIO_RW_2_CS = 11; // E18
static constexpr uint32_t GPIO_RW_3_CS = 6; // B19
static constexpr char HEATER_0[] = "heater0";
static constexpr char HEATER_1[] = "heater1";
static constexpr char HEATER_2[] = "heater2";
static constexpr char HEATER_3[] = "heater3";
static constexpr char HEATER_4[] = "heater4";
static constexpr char HEATER_5[] = "heater5";
static constexpr char HEATER_6[] = "heater6";
static constexpr char HEATER_7[] = "heater7";
static constexpr char SA_DPL_PIN_0[] = "sa_dpl_0";
static constexpr char SA_DPL_PIN_1[] = "sa_dpl_1";
static constexpr char SPI_MUX_BIT_0_PIN[] = "spi_mux_bit_0";
static constexpr char SPI_MUX_BIT_1_PIN[] = "spi_mux_bit_1";
static constexpr char SPI_MUX_BIT_2_PIN[] = "spi_mux_bit_2";
static constexpr char SPI_MUX_BIT_3_PIN[] = "spi_mux_bit_3";
static constexpr char SPI_MUX_BIT_4_PIN[] = "spi_mux_bit_4";
static constexpr char SPI_MUX_BIT_5_PIN[] = "spi_mux_bit_5";
static constexpr char EN_RW_CS[] = "en_rw_cs";
static constexpr char EN_RW_1[] = "enable_rw_1";
static constexpr char EN_RW_2[] = "enable_rw_2";
static constexpr char EN_RW_3[] = "enable_rw_3";
static constexpr char EN_RW_4[] = "enable_rw_4";
static constexpr uint32_t GPIO_GYRO_1_L3G_CS = 18; // N22
static constexpr uint32_t GPIO_GYRO_3_L3G_CS = 1; // M21
static constexpr uint32_t GPIO_MGM_0_LIS3_CS = 5; // C18
static constexpr uint32_t GPIO_MGM_1_RM3100_CS = 16; // A16
static constexpr uint32_t GPIO_MGM_3_RM3100_CS = 10; // C17
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 RS485_EN_TX_CLOCK[] = "tx_clock_enable_ltc2872";
static constexpr char RS485_EN_TX_DATA[] = "tx_data_enable_ltc2872";
static constexpr char RS485_EN_RX_CLOCK[] = "rx_clock_enable_ltc2872";
static constexpr char RS485_EN_RX_DATA[] = "rx_data_enable_ltc2872";
static constexpr char PDEC_RESET[] = "pdec_reset";
// Active low enable pin (needs to be driven low for regular operations)
static constexpr uint32_t GPIO_GYRO_0_ENABLE = 2; // H22
static constexpr char PL_PCDU_ENABLE_VBAT0[] = "enable_plpcdu_vbat0";
static constexpr char PL_PCDU_ENABLE_VBAT1[] = "enable_plpcdu_vbat1";
static constexpr char PL_PCDU_ENABLE_DRO[] = "enable_plpcdu_dro";
static constexpr char PL_PCDU_ENABLE_X8[] = "enable_plpcdu_x8";
static constexpr char PL_PCDU_ENABLE_TX[] = "enable_plpcdu_tx";
static constexpr char PL_PCDU_ENABLE_HPA[] = "enable_plpcdu_hpa";
static constexpr char PL_PCDU_ENABLE_MPA[] = "enable_plpcdu_mpa";
static constexpr char PL_PCDU_ADC_CS[] = "plpcdu_adc_chip_select";
// Active low reset pin (needs to be driven high for regular operations)
static constexpr uint32_t GPIO_RESET_GNSS_0 = 9; // C22
static constexpr uint32_t GPIO_RESET_GNSS_1 = 12; // B21
static constexpr uint32_t GPIO_RAD_SENSOR_CS = 19; // R18
/**************************************************************/
/** OBC1F B1 */
/**************************************************************/
static constexpr char GPIO_FLEX_OBC1F_B1[] = "/amba_pl/gpio@42030000";
// Need to use chip name here for now because the label name is the name for
// gpiochip 5 and gpiochip6
static constexpr char GPIO_FLEX_OBC1F_B1_CHIP[] = "gpiochip6";
static const char* const GPIO_MGM2_LIS3_LABEL = GPIO_FLEX_OBC1F_B1_CHIP;
static constexpr uint32_t GPIO_MGM_2_LIS3_CS = 0; // D18
/**************************************************************/
/** OBC1C */
/**************************************************************/
static constexpr char GPIO_3V3_OBC1C[] = "/amba_pl/gpio@42040000";
static const char* const GPIO_HEATER_LABEL = GPIO_3V3_OBC1C;
static const char* const GPIO_SOLAR_ARR_DEPL_LABEL = GPIO_3V3_OBC1C;
static constexpr uint32_t GPIO_HEATER_0_PIN = 6;
static constexpr uint32_t GPIO_HEATER_1_PIN = 12;
static constexpr uint32_t GPIO_HEATER_2_PIN = 7;
static constexpr uint32_t GPIO_HEATER_3_PIN = 5;
static constexpr uint32_t GPIO_HEATER_4_PIN = 3;
static constexpr uint32_t GPIO_HEATER_5_PIN = 0;
static constexpr uint32_t GPIO_HEATER_6_PIN = 1;
static constexpr uint32_t GPIO_HEATER_7_PIN = 11;
static constexpr uint32_t GPIO_GYRO_2_ENABLE = 18; // F22
static constexpr uint32_t GPIO_SOL_DEPL_SA_0_PIN = 4;
static constexpr uint32_t GPIO_SOL_DEPL_SA_1_PIN = 2;
static constexpr char GPIO_RW_SPI_MUX_LABEL[] = "zynq_gpio";
// Uses EMIO interface to PL, starts at 54
static constexpr uint32_t GPIO_RW_SPI_MUX_CS = 54;
static constexpr uint32_t SPI_MUX_BIT_1 = 13;
static constexpr uint32_t SPI_MUX_BIT_2 = 14;
static constexpr uint32_t SPI_MUX_BIT_3 = 15;
static constexpr uint32_t SPI_MUX_BIT_4 = 16;
static constexpr uint32_t SPI_MUX_BIT_5 = 17;
static constexpr uint32_t SPI_MUX_BIT_6 = 9;
static constexpr uint32_t EN_RW_CS = 17;
}
} // namespace gpioNames
} // namespace q7s
#endif /* BSP_Q7S_BOARDCONFIG_BUSCONF_H_ */

View File

@ -7,7 +7,8 @@ extern "C" void __gcov_flush();
#else
void __gcov_flush() {
sif::info << "GCC GCOV: Please supply GCOV=1 in Makefile if "
"coverage information is desired.\n" << std::flush;
"coverage information is desired.\n"
<< std::flush;
}
#endif

View File

@ -8,7 +8,3 @@ void printChar(const char* character, bool errStream) {
}
putc(*character, stdout);
}

View File

@ -3,8 +3,6 @@
#include <cstdint>
#cmakedefine01 Q7S_SIMPLE_MODE
/*******************************************************************/
/** All of the following flags should be enabled for mission code */
/*******************************************************************/

View File

@ -1,8 +1,10 @@
target_sources(${TARGET_NAME} PRIVATE
target_sources(${OBSW_NAME} PRIVATE
FileSystemTest.cpp
Q7STestTask.cpp
)
if(EIVE_BUILD_Q7S_SIMPLE_MODE)
target_sources(${SIMPLE_OBSW_NAME} PRIVATE
FileSystemTest.cpp
)
endif()

View File

@ -1,13 +1,11 @@
#include "FileSystemTest.h"
#include <cstdlib>
#include <iostream>
#include "fsfw/timemanager/Stopwatch.h"
#include <iostream>
#include <cstdlib>
enum SdCard {
SDC0,
SDC1
};
enum SdCard { SDC0, SDC1 };
FileSystemTest::FileSystemTest() {
using namespace std;
@ -22,5 +20,4 @@ FileSystemTest::FileSystemTest() {
// stopwatch.stop(true);
}
FileSystemTest::~FileSystemTest() {
}
FileSystemTest::~FileSystemTest() {}

View File

@ -5,9 +5,8 @@ class FileSystemTest {
public:
FileSystemTest();
virtual ~FileSystemTest();
private:
};
#endif /* BSP_Q7S_BOARDTEST_FILESYSTEMTEST_H_ */

View File

@ -1,36 +1,52 @@
#include "Q7STestTask.h"
#include <bsp_q7s/core/CoreController.h>
#include <bsp_q7s/memory/FileSystemHandler.h>
#include <fsfw/objectmanager/ObjectManager.h>
#include "Q7STestTask.h"
#include <gps.h>
#include <libgpsmm.h>
#include <cstdio>
#include <ctime>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <nlohmann/json.hpp>
#include "bsp_q7s/memory/SdCardManager.h"
#include "bsp_q7s/memory/scratchApi.h"
#include "fsfw/timemanager/Stopwatch.h"
#include "fsfw/tasks/TaskFactory.h"
#include "fsfw/timemanager/Stopwatch.h"
#include "test/DummyParameter.h"
#include <nlohmann/json.hpp>
#include <iostream>
#include <fstream>
#include <cstdio>
Q7STestTask::Q7STestTask(object_id_t objectId) : TestTask(objectId) {
doTestSdCard = false;
doTestScratchApi = false;
doTestGps = false;
}
ReturnValue_t Q7STestTask::performOneShotAction() {
//testSdCard();
//testScratchApi();
if (doTestSdCard) {
testSdCard();
}
if (doTestScratchApi) {
testScratchApi();
}
// testJsonLibDirect();
// testDummyParams();
// testProtHandler();
//FsOpCodes opCode = FsOpCodes::ATTEMPT_DIR_REMOVAL_NON_EMPTY;
//testFileSystemHandlerDirect(opCode);
FsOpCodes opCode = FsOpCodes::APPEND_TO_FILE;
testFileSystemHandlerDirect(opCode);
return TestTask::performOneShotAction();
}
ReturnValue_t Q7STestTask::performPeriodicAction() {
if (doTestGps) {
testGpsDaemon();
}
return TestTask::performPeriodicAction();
}
void Q7STestTask::testSdCard() {
using namespace std;
Stopwatch stopwatch;
@ -47,8 +63,7 @@ void Q7STestTask::testSdCard() {
while (iss >> word) {
if (word == "on") {
sif::info << "SD card " << static_cast<int>(idx) << " is on" << endl;
}
else if(word == "off") {
} else if (word == "off") {
sif::info << "SD card " << static_cast<int>(idx) << " is off" << endl;
}
}
@ -118,7 +133,6 @@ void Q7STestTask::testDummyParams() {
ReturnValue_t result = param.readJsonFile();
if (result != HasReturnvaluesIF::RETURN_OK) {
}
param.setValue(DummyParameter::DUMMY_KEY_PARAM_1, 3);
@ -127,8 +141,18 @@ void Q7STestTask::testDummyParams() {
param.writeJsonFile();
param.print();
int test = param.getValue<int>(DummyParameter::DUMMY_KEY_PARAM_1);
std::string test2 = param.getValue<std::string>(DummyParameter::DUMMY_KEY_PARAM_2);
int test = 0;
result = param.getValue<int>(DummyParameter::DUMMY_KEY_PARAM_1, test);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::warning << "Q7STestTask::testDummyParams: Key " << DummyParameter::DUMMY_KEY_PARAM_1
<< " does not exist" << std::endl;
}
std::string test2;
result = param.getValue<std::string>(DummyParameter::DUMMY_KEY_PARAM_2, test2);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::warning << "Q7STestTask::testDummyParams: Key " << DummyParameter::DUMMY_KEY_PARAM_1
<< " does not exist" << std::endl;
}
sif::info << "Test value (3 expected): " << test << std::endl;
sif::info << "Test value 2 (\"blirb\" expected): " << test2 << std::endl;
}
@ -136,8 +160,8 @@ void Q7STestTask::testDummyParams() {
ReturnValue_t Q7STestTask::initialize() {
coreController = ObjectManager::instance()->get<CoreController>(objects::CORE_CONTROLLER);
if (coreController == nullptr) {
sif::warning << "Q7STestTask::initialize: Could not retrieve CORE_CONTROLLER object" <<
std::endl;
sif::warning << "Q7STestTask::initialize: Could not retrieve CORE_CONTROLLER object"
<< std::endl;
}
return TestTask::initialize();
}
@ -146,16 +170,14 @@ void Q7STestTask::testProtHandler() {
bool opPerformed = false;
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
// If any chips are unlocked, lock them here
result = coreController->setBootCopyProtection(
CoreController::Chip::ALL_CHIP, CoreController::Copy::ALL_COPY, true,
result = coreController->setBootCopyProtection(xsc::Chip::ALL_CHIP, xsc::Copy::ALL_COPY, true,
opPerformed, true);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
}
// unlock own copy
result = coreController->setBootCopyProtection(
CoreController::Chip::SELF_CHIP, CoreController::Copy::SELF_COPY, false,
result = coreController->setBootCopyProtection(xsc::Chip::SELF_CHIP, xsc::Copy::SELF_COPY, false,
opPerformed, true);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
@ -169,8 +191,7 @@ void Q7STestTask::testProtHandler() {
}
// lock own copy
result = coreController->setBootCopyProtection(
CoreController::Chip::SELF_CHIP, CoreController::Copy::SELF_COPY, true,
result = coreController->setBootCopyProtection(xsc::Chip::SELF_CHIP, xsc::Copy::SELF_COPY, true,
opPerformed, true);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
@ -184,8 +205,7 @@ void Q7STestTask::testProtHandler() {
}
// unlock specific copy
result = coreController->setBootCopyProtection(
CoreController::Chip::CHIP_1, CoreController::Copy::COPY_1, false,
result = coreController->setBootCopyProtection(xsc::Chip::CHIP_1, xsc::Copy::COPY_1, false,
opPerformed, true);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
@ -199,8 +219,7 @@ void Q7STestTask::testProtHandler() {
}
// lock specific copy
result = coreController->setBootCopyProtection(
CoreController::Chip::CHIP_1, CoreController::Copy::COPY_1, true,
result = coreController->setBootCopyProtection(xsc::Chip::CHIP_1, xsc::Copy::COPY_1, true,
opPerformed, true);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
@ -214,9 +233,28 @@ void Q7STestTask::testProtHandler() {
}
}
void Q7STestTask::testGpsDaemon() {
gpsmm gpsmm(GPSD_SHARED_MEMORY, 0);
gps_data_t* gps;
gps = gpsmm.read();
if (gps == nullptr) {
sif::warning << "Q7STestTask: Reading GPS data failed" << std::endl;
}
sif::info << "-- Q7STestTask: GPS shared memory read test --" << std::endl;
time_t timeRaw = gps->fix.time.tv_sec;
std::tm* time = gmtime(&timeRaw);
sif::info << "Time: " << std::put_time(time, "%c %Z") << std::endl;
sif::info << "Visible satellites: " << gps->satellites_visible << std::endl;
sif::info << "Satellites used: " << gps->satellites_used << std::endl;
sif::info << "Fix (0:Not Seen|1:No Fix|2:2D|3:3D): " << gps->fix.mode << std::endl;
sif::info << "Latitude: " << gps->fix.latitude << std::endl;
sif::info << "Longitude: " << gps->fix.longitude << std::endl;
sif::info << "Altitude(MSL): " << gps->fix.altMSL << std::endl;
sif::info << "Speed(m/s): " << gps->fix.speed << std::endl;
}
void Q7STestTask::testFileSystemHandlerDirect(FsOpCodes opCode) {
auto fsHandler = ObjectManager::instance()->
get<FileSystemHandler>(objects::FILE_SYSTEM_HANDLER);
auto fsHandler = ObjectManager::instance()->get<FileSystemHandler>(objects::FILE_SYSTEM_HANDLER);
if (fsHandler == nullptr) {
sif::warning << "Q7STestTask::testFileSystemHandlerDirect: No FS handler running.."
<< std::endl;
@ -227,7 +265,7 @@ void Q7STestTask::testFileSystemHandlerDirect(FsOpCodes opCode) {
// Lambda for common code
auto createNonEmptyTmpDir = [&]() {
if (not std::filesystem::exists("/tmp/test")) {
result = fsHandler->createDirectory("/tmp/test", &cfg);
result = fsHandler->createDirectory("/tmp", "test", false, &cfg);
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
@ -245,14 +283,13 @@ void Q7STestTask::testFileSystemHandlerDirect(FsOpCodes opCode) {
return result;
};
switch (opCode) {
case (FsOpCodes::CREATE_EMPTY_FILE_IN_TMP): {
// No mount prefix, cause file is created in tmp
cfg.useMountPrefix = false;
sif::info << "Creating empty file in /tmp folder" << std::endl;
// Do not delete file, user can check existence in shell
fsHandler->createFile("/tmp", "test.txt", nullptr, 0, &cfg);
fsHandler->createFile("/tmp/", "test.txt", nullptr, 0, &cfg);
break;
}
case (FsOpCodes::REMOVE_TMP_FILE): {
@ -262,13 +299,12 @@ void Q7STestTask::testFileSystemHandlerDirect(FsOpCodes opCode) {
if (not std::filesystem::exists("/tmp/test.txt")) {
// Creating sample file
sif::info << "Creating sample file /tmp/test.txt to delete" << std::endl;
fsHandler->createFile("/tmp", "test.txt", nullptr, 0, &cfg);
fsHandler->createFile("/tmp/", "test.txt", nullptr, 0, &cfg);
}
result = fsHandler->removeFile("/tmp", "test.txt", &cfg);
if (result == HasReturnvaluesIF::RETURN_OK) {
sif::info << "File removed successfully" << std::endl;
}
else {
} else {
sif::warning << "File removal failed!" << std::endl;
}
break;
@ -278,11 +314,10 @@ void Q7STestTask::testFileSystemHandlerDirect(FsOpCodes opCode) {
cfg.useMountPrefix = false;
sif::info << "Creating empty file in /tmp folder" << std::endl;
// Do not delete file, user can check existence in shell
ReturnValue_t result = fsHandler->createDirectory("/tmp/test", &cfg);
ReturnValue_t result = fsHandler->createDirectory("/tmp/", "test", false, &cfg);
if (result == HasReturnvaluesIF::RETURN_OK) {
sif::info << "Directory created successfully" << std::endl;
}
else {
} else {
sif::warning << "Directory creation failed!" << std::endl;
}
break;
@ -291,17 +326,15 @@ void Q7STestTask::testFileSystemHandlerDirect(FsOpCodes opCode) {
// No mount prefix, cause file is created in tmp
cfg.useMountPrefix = false;
if (not std::filesystem::exists("/tmp/test")) {
result = fsHandler->createDirectory("/tmp/test", &cfg);
}
else {
result = fsHandler->createDirectory("/tmp", "test", false, &cfg);
} else {
// Delete any leftover files to regular dir removal works
std::remove("/tmp/test/*");
}
result = fsHandler->removeDirectory("/tmp/test", false, &cfg);
result = fsHandler->removeDirectory("/tmp/", "test", false, &cfg);
if (result == HasReturnvaluesIF::RETURN_OK) {
sif::info << "Directory removed successfully" << std::endl;
}
else {
} else {
sif::warning << "Directory removal failed!" << std::endl;
}
break;
@ -311,11 +344,10 @@ void Q7STestTask::testFileSystemHandlerDirect(FsOpCodes opCode) {
if (result != HasReturnvaluesIF::RETURN_OK) {
return;
}
result = fsHandler->removeDirectory("/tmp/test", true, &cfg);
result = fsHandler->removeDirectory("/tmp/", "test", true, &cfg);
if (result == HasReturnvaluesIF::RETURN_OK) {
sif::info << "Directory removed recursively successfully" << std::endl;
}
else {
} else {
sif::warning << "Recursive directory removal failed!" << std::endl;
}
break;
@ -325,13 +357,41 @@ void Q7STestTask::testFileSystemHandlerDirect(FsOpCodes opCode) {
if (result != HasReturnvaluesIF::RETURN_OK) {
return;
}
result = fsHandler->removeDirectory("/tmp/test", false, &cfg);
result = fsHandler->removeDirectory("/tmp/", "test", false, &cfg);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::info << "Directory removal attempt failed as expected" << std::endl;
}
else {
} else {
sif::warning << "Directory removal worked when it should not have!" << std::endl;
}
break;
}
case (FsOpCodes::RENAME_FILE): {
// No mount prefix, cause file is created in tmp
cfg.useMountPrefix = false;
if (std::filesystem::exists("/tmp/test.txt")) {
fsHandler->removeDirectory("/tmp/", "test", false, &cfg);
}
sif::info << "Creating empty file /tmp/test.txt and rename to /tmp/test2.txt" << std::endl;
// Do not delete file, user can check existence in shell
fsHandler->createFile("/tmp/", "test.txt", nullptr, 0, &cfg);
fsHandler->renameFile("/tmp/", "test.txt", "test2.txt", &cfg);
break;
}
case (FsOpCodes::APPEND_TO_FILE): {
// No mount prefix, cause file is created in tmp
cfg.useMountPrefix = false;
if (std::filesystem::exists("/tmp/test.txt")) {
fsHandler->removeDirectory("/tmp/", "test", false, &cfg);
}
if (std::filesystem::exists("/tmp/test.txt")) {
fsHandler->removeDirectory("/tmp/", "test", false, &cfg);
}
sif::info << "Creating empty file /tmp/test.txt and adding content" << std::endl;
std::string content = "Hello World\n";
// Do not delete file, user can check existence in shell
fsHandler->createFile("/tmp/", "test.txt", nullptr, 0, &cfg);
fsHandler->appendToFile("/tmp/", "test.txt", reinterpret_cast<const uint8_t*>(content.data()),
content.size(), 0, &cfg);
}
}
}

View File

@ -3,14 +3,24 @@
#include "test/testtasks/TestTask.h"
class CoreController;
class Q7STestTask : public TestTask {
public:
Q7STestTask(object_id_t objectId);
ReturnValue_t initialize() override;
private:
bool doTestSdCard = false;
bool doTestScratchApi = false;
bool doTestGps = false;
CoreController* coreController = nullptr;
ReturnValue_t performOneShotAction() override;
ReturnValue_t performPeriodicAction() override;
void testGpsDaemon();
void testSdCard();
void fileTests();
@ -27,9 +37,10 @@ private:
REMOVE_EMPTY_DIR_IN_TMP,
ATTEMPT_DIR_REMOVAL_NON_EMPTY,
REMOVE_FILLED_DIR_IN_TMP,
RENAME_FILE,
APPEND_TO_FILE,
};
void testFileSystemHandlerDirect(FsOpCodes opCode);
};
#endif /* BSP_Q7S_BOARDTEST_Q7STESTTASK_H_ */

View File

@ -1,4 +1,6 @@
target_sources(${TARGET_NAME} PRIVATE
target_sources(${OBSW_NAME} PRIVATE
rwSpiCallback.cpp
gnssCallback.cpp
pcduSwitchCb.cpp
gpioCallbacks.cpp
)

View File

@ -1,6 +1,6 @@
#include "gnssCallback.h"
#include "devices/gpioIds.h"
#include "devices/gpioIds.h"
#include "fsfw/tasks/TaskFactory.h"
ReturnValue_t gps::triggerGpioResetPin(void* args) {
@ -15,8 +15,7 @@ ReturnValue_t gps::triggerGpioResetPin(void *args) {
if (resetArgs->gnss1) {
gpioId = gpioIds::GNSS_1_NRESET;
}
else {
} else {
gpioId = gpioIds::GNSS_0_NRESET;
}
resetArgs->gpioComIF->pullLow(gpioId);

View File

@ -1,8 +1,8 @@
#ifndef BSP_Q7S_CALLBACKS_GNSSCALLBACK_H_
#define BSP_Q7S_CALLBACKS_GNSSCALLBACK_H_
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
struct ResetArgs {
bool gnss1 = false;

View File

@ -0,0 +1,487 @@
#include "gpioCallbacks.h"
#include <devices/gpioIds.h>
#include <fsfw/serviceinterface/ServiceInterface.h>
#include <fsfw_hal/common/gpio/GpioCookie.h>
#include <fsfw_hal/linux/gpio/LinuxLibgpioIF.h>
#include "busConf.h"
namespace gpioCallbacks {
GpioIF* gpioComInterface;
void initSpiCsDecoder(GpioIF* gpioComIF) {
using namespace gpio;
ReturnValue_t result;
if (gpioComIF == nullptr) {
sif::debug << "initSpiCsDecoder: Invalid gpioComIF" << std::endl;
return;
}
gpioComInterface = gpioComIF;
GpioCookie* spiMuxGpios = new GpioCookie;
GpiodRegularByLineName* spiMuxBit = nullptr;
/** Setting mux bit 1 to low will disable IC21 on the interface board */
spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_0_PIN, "SPI Mux Bit 1",
Direction::OUT, Levels::HIGH);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_0, spiMuxBit);
/** Setting mux bit 2 to low disables IC1 on the TCS board */
spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_1_PIN, "SPI Mux Bit 2",
Direction::OUT, Levels::HIGH);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_1, spiMuxBit);
/** Setting mux bit 3 to low disables IC2 on the TCS board and IC22 on the interface board */
spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_2_PIN, "SPI Mux Bit 3",
Direction::OUT, Levels::LOW);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_2, spiMuxBit);
/** The following gpios can take arbitrary initial values */
spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_3_PIN, "SPI Mux Bit 4",
Direction::OUT, Levels::LOW);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_3, spiMuxBit);
spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_4_PIN, "SPI Mux Bit 5",
Direction::OUT, Levels::LOW);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_4, spiMuxBit);
spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_5_PIN, "SPI Mux Bit 6",
Direction::OUT, Levels::LOW);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_5, spiMuxBit);
GpiodRegularByLineName* enRwDecoder = new GpiodRegularByLineName(
q7s::gpioNames::EN_RW_CS, "EN_RW_CS", Direction::OUT, Levels::HIGH);
spiMuxGpios->addGpio(gpioIds::EN_RW_CS, enRwDecoder);
result = gpioComInterface->addGpios(spiMuxGpios);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "initSpiCsDecoder: Failed to add mux bit gpios to gpioComIF" << std::endl;
return;
}
}
void spiCsDecoderCallback(gpioId_t gpioId, gpio::GpioOperation gpioOp, gpio::Levels value,
void* args) {
using namespace gpio;
if (gpioComInterface == nullptr) {
sif::debug << "spiCsDecoderCallback: No gpioComIF specified. Call initSpiCsDecoder "
<< "to specify gpioComIF" << std::endl;
return;
}
/* Reading is not supported by the callback function */
if (gpioOp == gpio::GpioOperation::READ) {
return;
}
if (value == Levels::HIGH) {
switch (gpioId) {
case (gpioIds::RTD_IC_3): {
disableDecoderTcsIc1();
break;
}
case (gpioIds::RTD_IC_4): {
disableDecoderTcsIc1();
break;
}
case (gpioIds::RTD_IC_5): {
disableDecoderTcsIc1();
break;
}
case (gpioIds::RTD_IC_6): {
disableDecoderTcsIc1();
break;
}
case (gpioIds::RTD_IC_7): {
disableDecoderTcsIc1();
break;
}
case (gpioIds::RTD_IC_8): {
disableDecoderTcsIc1();
break;
}
case (gpioIds::RTD_IC_9): {
disableDecoderTcsIc1();
break;
}
case (gpioIds::RTD_IC_10): {
disableDecoderTcsIc1();
break;
}
case (gpioIds::RTD_IC_11): {
disableDecoderTcsIc2();
break;
}
case (gpioIds::RTD_IC_12): {
disableDecoderTcsIc2();
break;
}
case (gpioIds::RTD_IC_13): {
disableDecoderTcsIc2();
break;
}
case (gpioIds::RTD_IC_14): {
disableDecoderTcsIc2();
break;
}
case (gpioIds::RTD_IC_15): {
disableDecoderTcsIc2();
break;
}
case (gpioIds::RTD_IC_16): {
disableDecoderTcsIc2();
break;
}
case (gpioIds::RTD_IC_17): {
disableDecoderTcsIc2();
break;
}
case (gpioIds::RTD_IC_18): {
disableDecoderTcsIc2();
break;
}
case (gpioIds::CS_SUS_0): {
disableDecoderInterfaceBoardIc1();
break;
}
case (gpioIds::CS_SUS_1): {
disableDecoderInterfaceBoardIc1();
break;
}
case (gpioIds::CS_SUS_2): {
disableDecoderInterfaceBoardIc1();
break;
}
case (gpioIds::CS_SUS_3): {
disableDecoderInterfaceBoardIc1();
break;
}
case (gpioIds::CS_SUS_4): {
disableDecoderInterfaceBoardIc1();
break;
}
case (gpioIds::CS_SUS_5): {
disableDecoderInterfaceBoardIc1();
break;
}
case (gpioIds::CS_SUS_6): {
disableDecoderInterfaceBoardIc2();
break;
}
case (gpioIds::CS_SUS_7): {
disableDecoderInterfaceBoardIc2();
break;
}
case (gpioIds::CS_SUS_8): {
disableDecoderInterfaceBoardIc2();
break;
}
case (gpioIds::CS_SUS_9): {
disableDecoderInterfaceBoardIc2();
break;
}
case (gpioIds::CS_SUS_10): {
disableDecoderInterfaceBoardIc2();
break;
}
case (gpioIds::CS_SUS_11): {
disableDecoderInterfaceBoardIc2();
break;
}
case (gpioIds::CS_RW1): {
disableRwDecoder();
break;
}
case (gpioIds::CS_RW2): {
disableRwDecoder();
break;
}
case (gpioIds::CS_RW3): {
disableRwDecoder();
break;
}
case (gpioIds::CS_RW4): {
disableRwDecoder();
break;
}
default:
sif::debug << "spiCsDecoderCallback: Invalid gpio id " << gpioId << std::endl;
}
} else if (value == Levels::LOW) {
switch (gpioId) {
case (gpioIds::RTD_IC_3): {
selectY7();
enableDecoderTcsIc1();
break;
}
case (gpioIds::RTD_IC_4): {
selectY6();
enableDecoderTcsIc1();
break;
}
case (gpioIds::RTD_IC_5): {
selectY5();
enableDecoderTcsIc1();
break;
}
case (gpioIds::RTD_IC_6): {
selectY4();
enableDecoderTcsIc1();
break;
}
case (gpioIds::RTD_IC_7): {
selectY3();
enableDecoderTcsIc1();
break;
}
case (gpioIds::RTD_IC_8): {
selectY2();
enableDecoderTcsIc1();
break;
}
case (gpioIds::RTD_IC_9): {
selectY1();
enableDecoderTcsIc1();
break;
}
case (gpioIds::RTD_IC_10): {
selectY0();
enableDecoderTcsIc1();
break;
}
case (gpioIds::RTD_IC_11): {
selectY7();
enableDecoderTcsIc2();
break;
}
case (gpioIds::RTD_IC_12): {
selectY6();
enableDecoderTcsIc2();
break;
}
case (gpioIds::RTD_IC_13): {
selectY5();
enableDecoderTcsIc2();
break;
}
case (gpioIds::RTD_IC_14): {
selectY4();
enableDecoderTcsIc2();
break;
}
case (gpioIds::RTD_IC_15): {
selectY3();
enableDecoderTcsIc2();
break;
}
case (gpioIds::RTD_IC_16): {
selectY2();
enableDecoderTcsIc2();
break;
}
case (gpioIds::RTD_IC_17): {
selectY1();
enableDecoderTcsIc2();
break;
}
case (gpioIds::RTD_IC_18): {
selectY0();
enableDecoderTcsIc2();
break;
}
case (gpioIds::CS_SUS_0): {
selectY0();
enableDecoderInterfaceBoardIc1();
break;
}
case (gpioIds::CS_SUS_1): {
selectY1();
enableDecoderInterfaceBoardIc1();
break;
}
case (gpioIds::CS_SUS_2): {
selectY2();
enableDecoderInterfaceBoardIc1();
break;
}
case (gpioIds::CS_SUS_3): {
selectY3();
enableDecoderInterfaceBoardIc1();
break;
}
case (gpioIds::CS_SUS_4): {
selectY4();
enableDecoderInterfaceBoardIc1();
break;
}
case (gpioIds::CS_SUS_5): {
selectY5();
enableDecoderInterfaceBoardIc1();
break;
}
case (gpioIds::CS_SUS_6): {
selectY0();
enableDecoderInterfaceBoardIc2();
break;
}
case (gpioIds::CS_SUS_7): {
selectY1();
enableDecoderInterfaceBoardIc2();
break;
}
case (gpioIds::CS_SUS_8): {
selectY2();
enableDecoderInterfaceBoardIc2();
break;
}
case (gpioIds::CS_SUS_9): {
selectY3();
enableDecoderInterfaceBoardIc2();
break;
}
case (gpioIds::CS_SUS_10): {
selectY4();
enableDecoderInterfaceBoardIc2();
break;
}
case (gpioIds::CS_SUS_11): {
selectY5();
enableDecoderInterfaceBoardIc2();
break;
}
case (gpioIds::CS_RW1): {
selectY0();
enableRwDecoder();
break;
}
case (gpioIds::CS_RW2): {
selectY1();
enableRwDecoder();
break;
}
case (gpioIds::CS_RW3): {
selectY2();
enableRwDecoder();
break;
}
case (gpioIds::CS_RW4): {
selectY3();
enableRwDecoder();
break;
}
default:
sif::debug << "spiCsDecoderCallback: Invalid gpio id " << gpioId << std::endl;
}
} else {
sif::debug << "spiCsDecoderCallback: Invalid value. Must be 0 or 1" << std::endl;
}
}
void enableDecoderTcsIc1() {
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_0);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_1);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_2);
}
void enableDecoderTcsIc2() {
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_2);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_0);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_1);
}
void enableDecoderInterfaceBoardIc1() {
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_0);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_1);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_2);
}
void enableDecoderInterfaceBoardIc2() {
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_0);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_1);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_2);
}
void disableDecoderTcsIc1() {
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_0);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_1);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_2);
}
void disableDecoderTcsIc2() {
// DO NOT CHANGE THE ORDER HERE
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_0);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_2);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_1);
}
void disableDecoderInterfaceBoardIc1() {
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_0);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_1);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_2);
}
void disableDecoderInterfaceBoardIc2() {
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_0);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_1);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_2);
}
void enableRwDecoder() { gpioComInterface->pullHigh(gpioIds::EN_RW_CS); }
void disableRwDecoder() { gpioComInterface->pullLow(gpioIds::EN_RW_CS); }
void selectY0() {
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_3);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_4);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_5);
}
void selectY1() {
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_3);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_4);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_5);
}
void selectY2() {
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_3);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_4);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_5);
}
void selectY3() {
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_3);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_4);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_5);
}
void selectY4() {
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_3);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_4);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_5);
}
void selectY5() {
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_3);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_4);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_5);
}
void selectY6() {
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_3);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_4);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_5);
}
void selectY7() {
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_3);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_4);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_5);
}
void disableAllDecoder() {
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_2);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_0);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_1);
gpioComInterface->pullLow(gpioIds::EN_RW_CS);
}
} // namespace gpioCallbacks

View File

@ -0,0 +1,73 @@
#ifndef LINUX_GPIO_GPIOCALLBACKS_H_
#define LINUX_GPIO_GPIOCALLBACKS_H_
#include <fsfw_hal/common/gpio/GpioIF.h>
#include <fsfw_hal/common/gpio/gpioDefinitions.h>
namespace gpioCallbacks {
/**
* @brief This function initializes the GPIOs used to control the SN74LVC138APWR decoders on
* the TCS Board and the interface board.
*/
void initSpiCsDecoder(GpioIF* gpioComIF);
/**
* @brief This function implements the decoding to multiply gpios by using the decoder
* chips SN74LVC138APWR on the TCS board and the interface board.
*/
void spiCsDecoderCallback(gpioId_t gpioId, gpio::GpioOperation gpioOp, gpio::Levels value,
void* args);
/**
* @brief This function sets mux bits 1-3 to a state which will only enable the decoder
* on the TCS board which is named to IC1 in the schematic.
*/
void enableDecoderTcsIc1();
/**
* @brief This function sets mux bits 1-3 to a state which will only enable the decoder
* on the TCS board which is named to IC2 in the schematic.
*/
void enableDecoderTcsIc2();
/**
* @brief This function sets mux bits 1-3 to a state which will only enable the decoder
* on the inteface board board which is named to IC21 in the schematic.
*/
void enableDecoderInterfaceBoardIc1();
/**
* @brief This function sets mux bits 1-3 to a state which will only enable the decoder
* on the inteface board board which is named to IC22 in the schematic.
*/
void enableDecoderInterfaceBoardIc2();
void disableDecoderTcsIc1();
void disableDecoderTcsIc2();
void disableDecoderInterfaceBoardIc1();
void disableDecoderInterfaceBoardIc2();
/**
* @brief Enables the reaction wheel chip select decoder (IC3).
*/
void enableRwDecoder();
void disableRwDecoder();
/**
* @brief This function disables all decoder.
*/
void disableAllDecoder();
/** The following functions enable the appropriate channel of the currently enabled decoder */
void selectY0();
void selectY1();
void selectY2();
void selectY3();
void selectY4();
void selectY5();
void selectY6();
void selectY7();
} // namespace gpioCallbacks
#endif /* LINUX_GPIO_GPIOCALLBACKS_H_ */

View File

@ -0,0 +1,32 @@
#include "pcduSwitchCb.h"
#include <fsfw_hal/linux/gpio/LinuxLibgpioIF.h>
#include "devices/gpioIds.h"
void pcdu::switchCallback(GOMSPACE::Pdu pdu, uint8_t channel, bool state, void* args) {
LinuxLibgpioIF* gpioComIF = reinterpret_cast<LinuxLibgpioIF*>(args);
if (gpioComIF == nullptr) {
return;
}
if (pdu == GOMSPACE::Pdu::PDU1) {
PDU1::SwitchChannels typedChannel = static_cast<PDU1::SwitchChannels>(channel);
if (typedChannel == PDU1::SwitchChannels::ACS_A_SIDE) {
if (state) {
gpioComIF->pullHigh(gpioIds::GNSS_0_NRESET);
} else {
gpioComIF->pullLow(gpioIds::GNSS_0_NRESET);
}
}
} else if (pdu == GOMSPACE::Pdu::PDU2) {
PDU2::SwitchChannels typedChannel = static_cast<PDU2::SwitchChannels>(channel);
if (typedChannel == PDU2::SwitchChannels::ACS_B_SIDE) {
if (state) {
gpioComIF->pullHigh(gpioIds::GNSS_1_NRESET);
} else {
gpioComIF->pullLow(gpioIds::GNSS_1_NRESET);
}
}
}
}

View File

@ -0,0 +1,14 @@
#ifndef BSP_Q7S_CALLBACKS_PCDUSWITCHCB_H_
#define BSP_Q7S_CALLBACKS_PCDUSWITCHCB_H_
#include <cstdint>
#include "mission/devices/devicedefinitions/GomspaceDefinitions.h"
namespace pcdu {
void switchCallback(GOMSPACE::Pdu pdu, uint8_t channel, bool state, void* args);
}
#endif /* BSP_Q7S_CALLBACKS_PCDUSWITCHCB_H_ */

View File

@ -1,28 +1,36 @@
#include "rwSpiCallback.h"
#include "devices/gpioIds.h"
#include "mission/devices/RwHandler.h"
#include "fsfw_hal/linux/spi/SpiCookie.h"
#include "fsfw_hal/linux/UnixFileGuard.h"
#include "devices/gpioIds.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw_hal/linux/UnixFileGuard.h"
#include "fsfw_hal/linux/spi/SpiCookie.h"
#include "mission/devices/RwHandler.h"
namespace rwSpiCallback {
ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sendData,
size_t sendLen, void* args) {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
RwHandler* handler = reinterpret_cast<RwHandler*>(args);
if (handler == nullptr) {
sif::error << "rwSpiCallback::spiCallback: Pointer to handler is invalid"
<< std::endl;
sif::error << "rwSpiCallback::spiCallback: Pointer to handler is invalid" << std::endl;
return HasReturnvaluesIF::RETURN_FAILED;
}
uint8_t writeBuffer[2];
uint8_t writeSize = 0;
gpioId_t gpioId = cookie->getChipSelectPin();
GpioIF* gpioIF = comIf->getGpioInterface();
MutexIF::TimeoutType timeoutType = MutexIF::TimeoutType::WAITING;
uint32_t timeoutMs = 0;
MutexIF* mutex = comIf->getMutex(&timeoutType, &timeoutMs);
if (mutex == nullptr or gpioIF == nullptr) {
sif::debug << "rwSpiCallback::spiCallback: Mutex or GPIO interface invalid" << std::endl;
return HasReturnvaluesIF::RETURN_FAILED;
}
int fileDescriptor = 0;
std::string device = cookie->getSpiDevice();
UnixFileGuard fileHelper(device, &fileDescriptor, O_RDWR, "rwSpiCallback::spiCallback");
@ -35,27 +43,12 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie *cookie, const uint8_t *sen
cookie->getSpiParameters(spiMode, spiSpeed, nullptr);
comIf->setSpiSpeedAndMode(fileDescriptor, spiMode, spiSpeed);
gpioId_t gpioId = cookie->getChipSelectPin();
GpioIF* gpioIF = comIf->getGpioInterface();
MutexIF::TimeoutType timeoutType = MutexIF::TimeoutType::WAITING;
uint32_t timeoutMs = 0;
MutexIF* mutex = comIf->getMutex(&timeoutType, &timeoutMs);
if(mutex == nullptr or gpioIF == nullptr) {
sif::debug << "rwSpiCallback::spiCallback: Mutex or GPIO interface invalid" << std::endl;
return HasReturnvaluesIF::RETURN_FAILED;
}
result = mutex->lockMutex(timeoutType, timeoutMs);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::debug << "rwSpiCallback::spiCallback: Failed to lock mutex" << std::endl;
return result;
}
/** Disconnect PS SPI peripheral and select AXI SPI core */
if(gpioIF->pullHigh(gpioIds::SPI_MUX) != HasReturnvaluesIF::RETURN_OK) {
sif::error << "rwSpiCallback::spiCallback: Failed to pull spi mux gpio high" << std::endl;
}
/** Sending frame start sign */
writeBuffer[0] = 0x7E;
writeSize = 1;
@ -119,7 +112,7 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie *cookie, const uint8_t *sen
size_t replyBufferSize = cookie->getMaxBufferSize();
/** There must be a delay of 20 ms after sending the command */
/** There must be a delay of at least 20 ms after sending the command */
usleep(RwDefinitions::SPI_REPLY_DELAY);
/**
@ -133,8 +126,15 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie *cookie, const uint8_t *sen
closeSpi(gpioId, gpioIF, mutex);
return RwHandler::SPI_READ_FAILURE;
}
if (idx == 0) {
if (byteRead != FLAG_BYTE) {
sif::error << "Invalid data, expected start marker" << std::endl;
closeSpi(gpioId, gpioIF, mutex);
return RwHandler::NO_START_MARKER;
}
}
if (byteRead != 0x7E) {
if (byteRead != FLAG_BYTE) {
break;
}
@ -145,9 +145,12 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie *cookie, const uint8_t *sen
}
}
#if FSFW_HAL_SPI_WIRETAPPING == 1
sif::info << "RW start marker detected" << std::endl;
#endif
size_t decodedFrameLen = 0;
while (decodedFrameLen < replyBufferSize) {
/** First byte already read in */
if (decodedFrameLen != 0) {
byteRead = 0;
@ -158,11 +161,10 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie *cookie, const uint8_t *sen
}
}
if (byteRead == 0x7E) {
if (byteRead == FLAG_BYTE) {
/** Reached end of frame */
break;
}
else if (byteRead == 0x7D) {
} else if (byteRead == 0x7D) {
if (read(fileDescriptor, &byteRead, 1) != 1) {
sif::error << "rwSpiCallback::spiCallback: Read failed" << std::endl;
result = RwHandler::SPI_READ_FAILURE;
@ -172,20 +174,17 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie *cookie, const uint8_t *sen
*(rxBuf + decodedFrameLen) = 0x7E;
decodedFrameLen++;
continue;
}
else if (byteRead == 0x5D) {
} else if (byteRead == 0x5D) {
*(rxBuf + decodedFrameLen) = 0x7D;
decodedFrameLen++;
continue;
}
else {
} else {
sif::error << "rwSpiCallback::spiCallback: Invalid substitute" << std::endl;
closeSpi(gpioId, gpioIF, mutex);
result = RwHandler::INVALID_SUBSTITUTE;
break;
}
}
else {
} else {
*(rxBuf + decodedFrameLen) = byteRead;
decodedFrameLen++;
continue;
@ -226,12 +225,8 @@ void closeSpi (gpioId_t gpioId, GpioIF* gpioIF, MutexIF* mutex) {
}
}
if (mutex->unlockMutex() != HasReturnvaluesIF::RETURN_OK) {
sif::error << "rwSpiCallback::closeSpi: Failed to unlock mutex" << std::endl;;
}
/** Route SPI interface again to PS SPI peripheral */
if(gpioIF->pullLow(gpioIds::SPI_MUX) != HasReturnvaluesIF::RETURN_OK) {
sif::error << "rwSpiCallback::spiCallback: Failed to pull spi mux gpio low" << std::endl;
}
sif::error << "rwSpiCallback::closeSpi: Failed to unlock mutex" << std::endl;
;
}
}
} // namespace rwSpiCallback

View File

@ -2,12 +2,14 @@
#define BSP_Q7S_RW_SPI_CALLBACK_H_
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include "fsfw_hal/linux/spi/SpiComIF.h"
#include "fsfw_hal/common/gpio/GpioCookie.h"
#include "fsfw_hal/linux/spi/SpiComIF.h"
namespace rwSpiCallback {
//! This is the end and start marker of the frame datalinklayer
static constexpr uint8_t FLAG_BYTE = 0x7E;
/**
* @brief This is the callback function to send commands to the nano avionics reaction wheels and
* receive the replies.
@ -40,5 +42,5 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie *cookie, const uint8_t *sen
*/
void closeSpi(gpioId_t gpioId, GpioIF* gpioIF, MutexIF* mutex);
}
} // namespace rwSpiCallback
#endif /* BSP_Q7S_RW_SPI_CALLBACK_H_ */

View File

@ -1,4 +1,4 @@
target_sources(${TARGET_NAME} PRIVATE
target_sources(${OBSW_NAME} PRIVATE
)

View File

@ -1,6 +1,10 @@
target_sources(${TARGET_NAME} PRIVATE
target_sources(${OBSW_NAME} PRIVATE
CoreController.cpp
obsw.cpp
InitMission.cpp
ObjectFactory.cpp
)
target_sources(${SIMPLE_OBSW_NAME} PRIVATE
InitMission.cpp
)

File diff suppressed because it is too large Load Diff

View File

@ -2,47 +2,83 @@
#define BSP_Q7S_CORE_CORECONTROLLER_H_
#include <fsfw/globalfunctions/PeriodicOperationDivider.h>
#include "fsfw/controller/ExtendedControllerBase.h"
#include <libxiphos.h>
#include <cstddef>
#include "bsp_q7s/memory/SdCardManager.h"
#include "events/subsystemIdRanges.h"
#include "fsfw/controller/ExtendedControllerBase.h"
class Timer;
class SdCardManager;
class CoreController: public ExtendedControllerBase {
public:
enum Chip: uint8_t {
CHIP_0,
CHIP_1,
NO_CHIP,
SELF_CHIP,
ALL_CHIP
namespace xsc {
enum Chip : int { CHIP_0, CHIP_1, NO_CHIP, SELF_CHIP, ALL_CHIP };
enum Copy : int { COPY_0, COPY_1, NO_COPY, SELF_COPY, ALL_COPY };
} // namespace xsc
struct RebootFile {
static constexpr uint8_t DEFAULT_MAX_BOOT_CNT = 10;
bool enabled = true;
size_t maxCount = DEFAULT_MAX_BOOT_CNT;
uint32_t img00Cnt = 0;
uint32_t img01Cnt = 0;
uint32_t img10Cnt = 0;
uint32_t img11Cnt = 0;
bool img00Lock = false;
bool img01Lock = false;
bool img10Lock = false;
bool img11Lock = false;
uint32_t* relevantBootCnt = &img00Cnt;
bool bootFlag = false;
xsc::Chip lastChip = xsc::Chip::CHIP_0;
xsc::Copy lastCopy = xsc::Copy::COPY_0;
xsc::Chip mechanismNextChip = xsc::Chip::NO_CHIP;
xsc::Copy mechanismNextCopy = xsc::Copy::NO_COPY;
};
enum Copy: uint8_t {
COPY_0,
COPY_1,
NO_COPY,
SELF_COPY,
ALL_COPY
};
class CoreController : public ExtendedControllerBase {
public:
static xsc::Chip CURRENT_CHIP;
static xsc::Copy CURRENT_COPY;
static constexpr char CHIP_PROT_SCRIPT[] = "/home/root/scripts/get-chip-prot-status.sh";
static constexpr char CHIP_STATE_FILE[] = "/tmp/chip_prot_status.txt";
static constexpr char CURR_COPY_FILE[] = "/tmp/curr_copy.txt";
static constexpr char VERSION_FILE[] = "/conf/sd_status";
static constexpr char CONF_FOLDER[] = "conf";
static constexpr char VERSION_FILE_NAME[] = "version.txt";
static constexpr char REBOOT_FILE_NAME[] = "reboot.txt";
const std::string VERSION_FILE =
"/" + std::string(CONF_FOLDER) + "/" + std::string(VERSION_FILE_NAME);
const std::string REBOOT_FILE =
"/" + std::string(CONF_FOLDER) + "/" + std::string(REBOOT_FILE_NAME);
static constexpr ActionId_t LIST_DIRECTORY_INTO_FILE = 0;
static constexpr ActionId_t SWITCH_REBOOT_FILE_HANDLING = 5;
static constexpr ActionId_t RESET_REBOOT_COUNTERS = 6;
static constexpr ActionId_t SWITCH_IMG_LOCK = 7;
static constexpr ActionId_t SET_MAX_REBOOT_CNT = 8;
static constexpr ActionId_t REBOOT_OBC = 32;
static constexpr ActionId_t MOUNT_OTHER_COPY = 33;
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::CORE;
static constexpr Event ALLOC_FAILURE = event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM);
//! [EXPORT] : [COMMENT] Software reboot occured. Can also be a systemd reboot.
//! P1: Current Chip, P2: Current Copy
static constexpr Event REBOOT_SW = event::makeEvent(SUBSYSTEM_ID, 1, severity::MEDIUM);
//! [EXPORT] : [COMMENT] The reboot mechanism was triggered.
//! P1: First 16 bits: Last Chip, Last 16 bits: Last Copy,
//! P2: Each byte is the respective reboot count for the slots
static constexpr Event REBOOT_MECHANISM_TRIGGERED =
event::makeEvent(SUBSYSTEM_ID, 2, severity::MEDIUM);
//! Trying to find a way how to determine that the reboot came from ProASIC3 or PCDU..
static constexpr Event REBOOT_HW = event::makeEvent(SUBSYSTEM_ID, 3, severity::MEDIUM);
CoreController(object_id_t objectId);
virtual ~CoreController();
@ -51,8 +87,8 @@ public:
ReturnValue_t initializeAfterTaskCreation() override;
ReturnValue_t executeAction(ActionId_t actionId,
MessageQueueId_t commandedBy, const uint8_t *data, size_t size) override;
ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t* data, size_t size) override;
ReturnValue_t handleCommandMessage(CommandMessage* message) override;
void performControlOperation() override;
@ -63,7 +99,7 @@ public:
*/
static ReturnValue_t generateChipStateFile();
static ReturnValue_t incrementAllocationFailureCount();
static void getCurrentBootCopy(Chip& chip, Copy& copy);
static void getCurrentBootCopy(xsc::Chip& chip, xsc::Copy& copy);
ReturnValue_t updateProtInfo(bool regenerateChipStateFile = true);
@ -78,15 +114,12 @@ public:
* @param updateProtFile Specify whether the protection info file is updated
* @return
*/
ReturnValue_t setBootCopyProtection(Chip targetChip, Copy targetCopy,
bool protect, bool& protOperationPerformed, bool updateProtFile = true);
ReturnValue_t setBootCopyProtection(xsc::Chip targetChip, xsc::Copy targetCopy, bool protect,
bool& protOperationPerformed, bool updateProtFile = true);
bool sdInitFinished() const;
private:
static Chip CURRENT_CHIP;
static Copy CURRENT_COPY;
// Designated value for rechecking FIFO open
static constexpr int RETRY_FIFO_OPEN = -2;
int watchdogFifoFd = 0;
@ -135,8 +168,9 @@ private:
sd::SdState currentlyCommandedState = sd::SdState::OFF;
sd::SdCard commandedCard = sd::SdCard::NONE;
sd::SdState commandedState = sd::SdState::OFF;
};
SdInfo sdInfo;
} sdInfo;
RebootFile rebootFile = {};
bool doPerformMountedSdCardOps = true;
/**
* Index 0: Chip 0 Copy 0
@ -150,9 +184,8 @@ private:
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
LocalDataPoolManager& poolManager) override;
LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode,
uint32_t *msToReachTheMode);
ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode, uint32_t* msToReachTheMode);
void performMountedSdCardOperations();
ReturnValue_t initVersionFile();
ReturnValue_t initBootCopy();
ReturnValue_t initWatchdogFifo();
@ -164,10 +197,12 @@ private:
ReturnValue_t sdCardSetup(sd::SdCard sdCard, sd::SdState targetState, std::string sdChar,
bool printOutput = true);
ReturnValue_t sdColdRedundantBlockingInit();
void currentStateSetter(sd::SdCard sdCard, sd::SdState newState);
void determinePreferredSdCard();
void executeNextExternalSdCommand();
void checkExternalSdCommandStatus();
void performRebootFileHandling(bool recreateFile);
ReturnValue_t actionListDirectoryIntoFile(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t* data, size_t size);
@ -176,9 +211,15 @@ private:
void performWatchdogControlOperation();
ReturnValue_t handleProtInfoUpdateLine(std::string nextLine);
int handleBootCopyProtAtIndex(Chip targetChip, Copy targetCopy, bool protect,
bool &protOperationPerformed, bool selfChip, bool selfCopy, bool allChips,
bool allCopies, uint8_t arrIdx);
int handleBootCopyProtAtIndex(xsc::Chip targetChip, xsc::Copy targetCopy, bool protect,
bool& protOperationPerformed, bool selfChip, bool selfCopy,
bool allChips, bool allCopies, uint8_t arrIdx);
void determineAndExecuteReboot(RebootFile& rf, bool& needsReboot, xsc::Chip& tgtChip,
xsc::Copy& tgtCopy);
void resetRebootCount(xsc::Chip tgtChip, xsc::Copy tgtCopy);
void setRebootMechanismLock(bool lock, xsc::Chip tgtChip, xsc::Copy tgtCopy);
bool parseRebootFile(std::string path, RebootFile& file);
void rewriteRebootFile(RebootFile file);
};
#endif /* BSP_Q7S_CORE_CORECONTROLLER_H_ */

View File

@ -1,28 +1,27 @@
#include "InitMission.h"
#include "ObjectFactory.h"
#include "OBSWConfig.h"
#include "pollingsequence/pollingSequenceFactory.h"
#include "mission/utility/InitMission.h"
#include "fsfw/platform.h"
#include "fsfw/objectmanager/ObjectManagerIF.h"
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include "fsfw/serviceinterface/ServiceInterfaceStream.h"
#include "fsfw/objectmanager/ObjectManager.h"
#include "fsfw/tasks/FixedTimeslotTaskIF.h"
#include "fsfw/tasks/PeriodicTaskIF.h"
#include "fsfw/tasks/TaskFactory.h"
#include <iostream>
#include <vector>
#include "OBSWConfig.h"
#include "ObjectFactory.h"
#include "fsfw/objectmanager/ObjectManager.h"
#include "fsfw/objectmanager/ObjectManagerIF.h"
#include "fsfw/platform.h"
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include "fsfw/serviceinterface/ServiceInterfaceStream.h"
#include "fsfw/tasks/FixedTimeslotTaskIF.h"
#include "fsfw/tasks/PeriodicTaskIF.h"
#include "fsfw/tasks/TaskFactory.h"
#include "mission/utility/InitMission.h"
#include "pollingsequence/pollingSequenceFactory.h"
/* This is configured for linux without CR */
#ifdef PLATFORM_UNIX
ServiceInterfaceStream sif::debug("DEBUG");
ServiceInterfaceStream sif::info("INFO");
ServiceInterfaceStream sif::warning("WARNING");
ServiceInterfaceStream sif::error("ERROR", false, false, true);
ServiceInterfaceStream sif::error("ERROR");
#else
ServiceInterfaceStream sif::debug("DEBUG", true);
ServiceInterfaceStream sif::info("INFO", true);
@ -33,7 +32,6 @@ ServiceInterfaceStream sif::error("ERROR", true, false, true);
ObjectManagerIF* objectManager = nullptr;
void initmission::initMission() {
sif::info << "Building global objects.." << std::endl;
/* Instantiate global object manager and also create all objects */
ObjectManager::instance()->setObjectFactoryFunction(ObjectFactory::produce, nullptr);
@ -82,19 +80,49 @@ void initmission::initTasks() {
initmission::printAddObjectError("TM_FUNNEL", objects::TM_FUNNEL);
}
/* UDP bridge */
#if OBSW_ADD_TCPIP_BRIDGE == 1
// TMTC bridge
PeriodicTaskIF* tmtcBridgeTask = factory->createPeriodicTask(
"UDP_UNIX_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
"TCPIP_TMTC_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
result = tmtcBridgeTask->addComponent(objects::TMTC_BRIDGE);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("UDP_BRIDGE", objects::TMTC_BRIDGE);
initmission::printAddObjectError("TMTC_BRIDGE", objects::TMTC_BRIDGE);
}
PeriodicTaskIF* tmtcPollingTask = factory->createPeriodicTask(
"UDP_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
"TMTC_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
result = tmtcPollingTask->addComponent(objects::TMTC_POLLING_TASK);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("UDP_POLLING", objects::TMTC_POLLING_TASK);
}
#endif
#if OBSW_USE_CCSDS_IP_CORE == 1
PeriodicTaskIF* ccsdsHandlerTask = factory->createPeriodicTask(
"CCSDS_HANDLER", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
result = ccsdsHandlerTask->addComponent(objects::CCSDS_HANDLER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("CCSDS Handler", objects::CCSDS_HANDLER);
}
// Minimal distance between two received TCs amounts to 0.6 seconds
// If a command has not been read before the next one arrives, the old command will be
// overwritten by the PDEC.
PeriodicTaskIF* pdecHandlerTask = factory->createPeriodicTask(
"PDEC_HANDLER", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
result = pdecHandlerTask->addComponent(objects::PDEC_HANDLER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PDEC Handler", objects::PDEC_HANDLER);
}
#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */
#if OBSW_ADD_ACS_HANDLERS == 1
PeriodicTaskIF* acsCtrl = factory->createPeriodicTask(
"ACS_CTRL", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
result = acsCtrl->addComponent(objects::GPS_CONTROLLER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("ACS_CTRL", objects::GPS_CONTROLLER);
}
#endif /* OBSW_ADD_ACS_HANDLERS */
#if BOARD_TE0720 == 0
// FS task, task interval does not matter because it runs in permanent loop, priority low
@ -105,6 +133,16 @@ void initmission::initTasks() {
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("FILE_SYSTEM_TASK", objects::FILE_SYSTEM_HANDLER);
}
#if OBSW_ADD_STAR_TRACKER == 1
PeriodicTaskIF* strHelperTask = factory->createPeriodicTask(
"STR_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
result = strHelperTask->addComponent(objects::STR_HELPER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("STR_HELPER", objects::STR_HELPER);
}
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
#endif /* BOARD_TE0720 */
#if OBSW_TEST_CCSDS_BRIDGE == 1
@ -130,8 +168,7 @@ void initmission::initTasks() {
for (const auto& task : taskVector) {
if (task != nullptr) {
task->startTask();
}
else {
} else {
sif::error << "Task in vector " << name << " is invalid!" << std::endl;
}
}
@ -139,8 +176,17 @@ void initmission::initTasks() {
sif::info << "Starting tasks.." << std::endl;
tmTcDistributor->startTask();
#if OBSW_ADD_TCPIP_BRIDGE == 1
tmtcBridgeTask->startTask();
tmtcPollingTask->startTask();
#endif
#if OBSW_USE_CCSDS_IP_CORE == 1
ccsdsHandlerTask->startTask();
pdecHandlerTask->startTask();
#endif /* OBSW_USE_CCSDS_IP_CORE == 1 */
#if BOARD_TE0720 == 0
coreController->startTask();
#endif
@ -157,47 +203,61 @@ void initmission::initTasks() {
#if BOARD_TE0720 == 0
fsTask->startTask();
#if OBSW_ADD_STAR_TRACKER == 1
strHelperTask > startTask();
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
#endif
#if OBSW_ADD_ACS_HANDLERS == 1
acsCtrl->startTask();
#endif
sif::info << "Tasks started.." << std::endl;
}
void initmission::createPstTasks(TaskFactory& factory,
TaskDeadlineMissedFunction missedDeadlineFunc, std::vector<PeriodicTaskIF*> &taskVec) {
TaskDeadlineMissedFunction missedDeadlineFunc,
std::vector<PeriodicTaskIF*>& taskVec) {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
#if BOARD_TE0720 == 0
/* Polling Sequence Table Default */
#if OBSW_ADD_SPI_TEST_CODE == 0
FixedTimeslotTaskIF* spiPst = factory.createFixedTimeslotTask(
"PST_TASK_DEFAULT", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 3.0,
missedDeadlineFunc);
"PST_TASK_DEFAULT", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc);
result = pst::pstSpi(spiPst);
if (result != HasReturnvaluesIF::RETURN_OK) {
if (result != FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl;
}
} else {
taskVec.push_back(spiPst);
}
#endif
FixedTimeslotTaskIF* uartPst = factory.createFixedTimeslotTask(
"UART_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 3.0, missedDeadlineFunc);
"UART_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.2, missedDeadlineFunc);
result = pst::pstUart(uartPst);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl;
}
taskVec.push_back(uartPst);
FixedTimeslotTaskIF* gpioPst = factory.createFixedTimeslotTask(
"GPIO_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 3.0, missedDeadlineFunc);
"GPIO_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.2, missedDeadlineFunc);
result = pst::pstGpio(gpioPst);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl;
}
taskVec.push_back(gpioPst);
#if OBSW_ADD_I2C_TEST_CODE == 0
FixedTimeslotTaskIF* i2cPst = factory.createFixedTimeslotTask(
"I2C_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 3.0, missedDeadlineFunc);
"I2C_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.2, missedDeadlineFunc);
result = pst::pstI2c(i2cPst);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl;
}
taskVec.push_back(i2cPst);
#endif
FixedTimeslotTaskIF* gomSpacePstTask = factory.createFixedTimeslotTask(
"GS_PST_TASK", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 1.0, missedDeadlineFunc);
@ -208,8 +268,7 @@ void initmission::createPstTasks(TaskFactory& factory,
taskVec.push_back(gomSpacePstTask);
#else /* BOARD_TE7020 == 0 */
FixedTimeslotTaskIF* pollingSequenceTaskTE0720 = factory.createFixedTimeslotTask(
"PST_TASK_TE0720", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE * 8, 3.0,
missedDeadlineFunc);
"PST_TASK_TE0720", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE * 8, 3.0, missedDeadlineFunc);
result = pst::pollingSequenceTE0720(pollingSequenceTaskTE0720);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "InitMission::initTasks: Creating TE0720 PST failed!" << std::endl;
@ -219,7 +278,8 @@ void initmission::createPstTasks(TaskFactory& factory,
}
void initmission::createPusTasks(TaskFactory& factory,
TaskDeadlineMissedFunction missedDeadlineFunc, std::vector<PeriodicTaskIF*> &taskVec) {
TaskDeadlineMissedFunction missedDeadlineFunc,
std::vector<PeriodicTaskIF*>& taskVec) {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
/* PUS Services */
PeriodicTaskIF* pusVerification = factory.createPeriodicTask(
@ -287,19 +347,20 @@ void initmission::createPusTasks(TaskFactory &factory,
taskVec.push_back(pusLowPrio);
}
void initmission::createTestTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
void initmission::createTestTasks(TaskFactory& factory,
TaskDeadlineMissedFunction missedDeadlineFunc,
std::vector<PeriodicTaskIF*>& taskVec) {
#if OBSW_ADD_TEST_TASK == 1 || OBSW_ADD_SPI_TEST_CODE == 1 || (BOARD_TE0720 == 1 && OBSW_TEST_LIBGPIOD == 1)
#if OBSW_ADD_TEST_TASK == 1 && OBSW_ADD_TEST_CODE == 1
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
#endif
static_cast<void>(result); // supress warning in case it is not used
PeriodicTaskIF* testTask = factory.createPeriodicTask(
"TEST_TASK", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1, missedDeadlineFunc);
#if OBSW_ADD_TEST_TASK == 1
result = testTask->addComponent(objects::TEST_TASK);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("TEST_TASK", objects::TEST_TASK);
}
#endif /* OBSW_ADD_TEST_TASK == 1 */
#if OBSW_ADD_SPI_TEST_CODE == 1
result = testTask->addComponent(objects::SPI_TEST);
@ -307,6 +368,19 @@ void initmission::createTestTasks(TaskFactory& factory, TaskDeadlineMissedFuncti
initmission::printAddObjectError("SPI_TEST", objects::SPI_TEST);
}
#endif
#if OBSW_ADD_I2C_TEST_CODE == 1
result = testTask->addComponent(objects::I2C_TEST);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("I2C_TEST", objects::I2C_TEST);
}
#endif
#if OBSW_ADD_UART_TEST_CODE == 1
result = testTask->addComponent(objects::UART_TEST);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("UART_TEST", objects::UART_TEST);
}
#endif
#if BOARD_TE0720 == 1 && OBSW_TEST_LIBGPIOD == 1
result = testTask->addComponent(objects::LIBGPIOD_TEST);
if (result != HasReturnvaluesIF::RETURN_OK) {
@ -314,4 +388,6 @@ void initmission::createTestTasks(TaskFactory& factory, TaskDeadlineMissedFuncti
}
#endif /* BOARD_TE0720 == 1 && OBSW_TEST_LIBGPIOD == 1 */
taskVec.push_back(testTask);
#endif // OBSW_ADD_TEST_TASK == 1 && OBSW_ADD_TEST_CODE == 1
}

View File

@ -1,9 +1,10 @@
#ifndef BSP_Q7S_INITMISSION_H_
#define BSP_Q7S_INITMISSION_H_
#include "fsfw/tasks/Typedef.h"
#include <vector>
#include "fsfw/tasks/Typedef.h"
class PeriodicTaskIF;
class TaskFactory;
@ -17,6 +18,6 @@ void createPusTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadl
std::vector<PeriodicTaskIF*>& taskVec);
void createTestTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
std::vector<PeriodicTaskIF*>& taskVec);
};
}; // namespace initmission
#endif /* BSP_Q7S_INITMISSION_H_ */

File diff suppressed because it is too large Load Diff

View File

@ -4,6 +4,7 @@
class LinuxLibgpioIF;
class UartComIF;
class SpiComIF;
class I2cComIF;
namespace ObjectFactory {
@ -11,9 +12,11 @@ void setStatics();
void produce(void* args);
void createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, UartComIF** uartComIF,
SpiComIF** spiComIF);
SpiComIF** spiComIF, I2cComIF** i2cComIF);
void createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF);
void createTmpComponents();
void createPcduComponents();
void createPcduComponents(LinuxLibgpioIF* gpioComIF);
void createRadSensorComponent(LinuxLibgpioIF* gpioComIF);
void createSunSensorComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF);
void createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComIF* uartComIF);
@ -22,8 +25,9 @@ void createSolarArrayDeploymentComponents();
void createSyrlinksComponents();
void createRtdComponents(LinuxLibgpioIF* gpioComIF);
void createReactionWheelComponents(LinuxLibgpioIF* gpioComIF);
void createCcsdsComponents(LinuxLibgpioIF* gpioComIF);
void createTestComponents(LinuxLibgpioIF* gpioComIF);
};
}; // namespace ObjectFactory
#endif /* BSP_Q7S_OBJECTFACTORY_H_ */

View File

@ -1,8 +1,5 @@
#include "ParameterHandler.h"
ParameterHandler::ParameterHandler(std::string mountPrefix): mountPrefix(mountPrefix) {
}
ParameterHandler::ParameterHandler(std::string mountPrefix) : mountPrefix(mountPrefix) {}
void ParameterHandler::setMountPrefix(std::string prefix) {
mountPrefix = prefix;
}
void ParameterHandler::setMountPrefix(std::string prefix) { mountPrefix = prefix; }

View File

@ -4,8 +4,6 @@
#include <nlohmann/json.hpp>
#include <string>
class ParameterHandler {
public:
ParameterHandler(std::string mountPrefix);
@ -13,10 +11,10 @@ public:
void setMountPrefix(std::string prefix);
void setUpDummyParameter();
private:
std::string mountPrefix;
DummyParameter dummyParam;
};
#endif /* BSP_Q7S_CORE_PARAMETERHANDLER_H_ */

View File

@ -1,14 +1,14 @@
#include "obsw.h"
#include "OBSWVersion.h"
#include "OBSWConfig.h"
#include "InitMission.h"
#include "watchdogConf.h"
#include "fsfw/tasks/TaskFactory.h"
#include "fsfw/FSFWVersion.h"
#include <iostream>
#include <filesystem>
#include <iostream>
#include "InitMission.h"
#include "OBSWConfig.h"
#include "OBSWVersion.h"
#include "fsfw/FSFWVersion.h"
#include "fsfw/tasks/TaskFactory.h"
#include "watchdogConf.h"
static int OBSW_ALREADY_RUNNING = -2;
@ -19,17 +19,18 @@ int obsw::obsw() {
#else
std::cout << "-- Compiled for Linux (TE0720) --" << std::endl;
#endif
std::cout << "-- OBSW v" << SW_VERSION << "." << SW_SUBVERSION <<
"." << SW_REVISION << ", FSFW v" << FSFW_VERSION << "." << FSFW_SUBVERSION << "." <<
FSFW_REVISION << "--" << std::endl;
std::cout << "-- OBSW v" << SW_VERSION << "." << SW_SUBVERSION << "." << SW_REVISION << ", FSFW v"
<< FSFW_VERSION << "." << FSFW_SUBVERSION << "." << FSFW_REVISION << "--" << std::endl;
std::cout << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl;
#if Q7S_CHECK_FOR_ALREADY_RUNNING_IMG == 1
// Check special file here. This file is created or deleted by the eive-watchdog application
// or systemd service!
if (std::filesystem::exists(watchdog::RUNNING_FILE_NAME)) {
sif::warning << "File " << watchdog::RUNNING_FILE_NAME << " exists so the software might "
"already be running. Aborting.." << std::endl;
sif::warning << "File " << watchdog::RUNNING_FILE_NAME
<< " exists so the software might "
"already be running. Check if obsw systemd service has been stopped."
<< std::endl;
return OBSW_ALREADY_RUNNING;
}
#endif

View File

@ -1,4 +1,4 @@
target_sources(${TARGET_NAME} PRIVATE
target_sources(${OBSW_NAME} PRIVATE
PlocSupervisorHandler.cpp
PlocUpdater.cpp
PlocMemoryDumper.cpp

View File

@ -1,21 +1,23 @@
#include <fsfw/src/fsfw/serialize/SerializeAdapter.h>
#include "fsfw/ipc/QueueFactory.h"
#include "PlocMemoryDumper.h"
#include <fstream>
#include <fsfw/src/fsfw/serialize/SerializeAdapter.h>
#include <filesystem>
#include <fstream>
#include <string>
PlocMemoryDumper::PlocMemoryDumper(object_id_t objectId) :
SystemObject(objectId), commandActionHelper(this), actionHelper(this, nullptr) {
commandQueue = QueueFactory::instance()->createMessageQueue(QUEUE_SIZE);
#include "fsfw/ipc/QueueFactory.h"
PlocMemoryDumper::PlocMemoryDumper(object_id_t objectId)
: SystemObject(objectId), commandActionHelper(this), actionHelper(this, nullptr) {
auto mqArgs = MqArgs(this->getObjectId());
commandQueue = QueueFactory::instance()->createMessageQueue(
QUEUE_SIZE, MessageQueueMessage::MAX_MESSAGE_SIZE, &mqArgs);
}
PlocMemoryDumper::~PlocMemoryDumper() {
}
PlocMemoryDumper::~PlocMemoryDumper() {}
ReturnValue_t PlocMemoryDumper::initialize() {
ReturnValue_t result = SystemObject::initialize();
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
@ -38,9 +40,8 @@ ReturnValue_t PlocMemoryDumper::performOperation(uint8_t operationCode) {
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t PlocMemoryDumper::executeAction(ActionId_t actionId,
MessageQueueId_t commandedBy, const uint8_t* data, size_t size) {
ReturnValue_t PlocMemoryDumper::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t* data, size_t size) {
if (state != State::IDLE) {
return IS_BUSY;
}
@ -71,13 +72,9 @@ ReturnValue_t PlocMemoryDumper::executeAction(ActionId_t actionId,
return EXECUTION_FINISHED;
}
MessageQueueId_t PlocMemoryDumper::getCommandQueue() const {
return commandQueue->getId();
}
MessageQueueId_t PlocMemoryDumper::getCommandQueue() const { return commandQueue->getId(); }
MessageQueueIF* PlocMemoryDumper::getCommandQueuePtr() {
return commandQueue;
}
MessageQueueIF* PlocMemoryDumper::getCommandQueuePtr() { return commandQueue; }
void PlocMemoryDumper::readCommandQueue() {
CommandMessage message;
@ -121,17 +118,12 @@ void PlocMemoryDumper::doStateMachine() {
}
}
void PlocMemoryDumper::stepSuccessfulReceived(ActionId_t actionId,
uint8_t step) {
}
void PlocMemoryDumper::stepSuccessfulReceived(ActionId_t actionId, uint8_t step) {}
void PlocMemoryDumper::stepFailedReceived(ActionId_t actionId, uint8_t step,
ReturnValue_t returnCode) {
}
ReturnValue_t returnCode) {}
void PlocMemoryDumper::dataReceived(ActionId_t actionId, const uint8_t* data, uint32_t size) {
}
void PlocMemoryDumper::dataReceived(ActionId_t actionId, const uint8_t* data, uint32_t size) {}
void PlocMemoryDumper::completionSuccessfulReceived(ActionId_t actionId) {
switch (pendingCommand) {
@ -140,8 +132,7 @@ void PlocMemoryDumper::completionSuccessfulReceived(ActionId_t actionId) {
if (mram.endAddress == mram.startAddress) {
triggerEvent(MRAM_DUMP_FINISHED);
state = State::IDLE;
}
else {
} else {
state = State::COMMAND_CONSECUTIVE_MRAM_DUMP;
}
break;
@ -153,8 +144,7 @@ void PlocMemoryDumper::completionSuccessfulReceived(ActionId_t actionId) {
}
}
void PlocMemoryDumper::completionFailedReceived(ActionId_t actionId,
ReturnValue_t returnCode) {
void PlocMemoryDumper::completionFailedReceived(ActionId_t actionId, ReturnValue_t returnCode) {
switch (pendingCommand) {
case (PLOC_SPV::FIRST_MRAM_DUMP):
case (PLOC_SPV::CONSECUTIVE_MRAM_DUMP):
@ -179,8 +169,7 @@ void PlocMemoryDumper::commandNextMramDump(ActionId_t dumpCommand) {
tempEndAddress = mram.startAddress + MAX_MRAM_DUMP_SIZE;
mram.startAddress += MAX_MRAM_DUMP_SIZE;
mram.lastStartAddress = tempStartAddress;
}
else {
} else {
tempStartAddress = mram.startAddress;
tempEndAddress = mram.endAddress;
mram.startAddress = mram.endAddress;
@ -188,8 +177,8 @@ void PlocMemoryDumper::commandNextMramDump(ActionId_t dumpCommand) {
MemoryParams params(tempStartAddress, tempEndAddress);
result = commandActionHelper.commandAction(objects::PLOC_SUPERVISOR_HANDLER,
dumpCommand, &params);
result =
commandActionHelper.commandAction(objects::PLOC_SUPERVISOR_HANDLER, dumpCommand, &params);
if (result != RETURN_OK) {
sif::warning << "PlocMemoryDumper::commandNextMramDump: Failed to send mram dump command "
<< "with start address " << tempStartAddress << " and end address "
@ -203,4 +192,3 @@ void PlocMemoryDumper::commandNextMramDump(ActionId_t dumpCommand) {
pendingCommand = dumpCommand;
return;
}

View File

@ -3,18 +3,18 @@
#include <bsp_q7s/devices/devicedefinitions/PlocMemDumpDefinitions.h>
#include <bsp_q7s/devices/devicedefinitions/PlocSupervisorDefinitions.h>
#include "OBSWConfig.h"
#include "fsfw/action/CommandActionHelper.h"
#include "bsp_q7s/memory/SdCardManager.h"
#include "fsfw/action/ActionHelper.h"
#include "fsfw/action/HasActionsIF.h"
#include "fsfw/action/CommandActionHelper.h"
#include "fsfw/action/CommandsActionsIF.h"
#include "fsfw/action/HasActionsIF.h"
#include "fsfw/objectmanager/SystemObject.h"
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include "fsfw/tasks/ExecutableObjectIF.h"
#include "fsfw/objectmanager/SystemObject.h"
#include "bsp_q7s/memory/SdCardManager.h"
#include "linux/fsfwconfig/objects/systemObjectList.h"
#include "fsfw/tmtcpacket/SpacePacket.h"
#include "linux/fsfwconfig/objects/systemObjectList.h"
/**
* @brief Because the buffer of the linux tty driver is limited to 2 x 65535 bytes, this class is
@ -30,7 +30,6 @@ class PlocMemoryDumper : public SystemObject,
public HasReturnvaluesIF,
public CommandsActionsIF {
public:
static const ActionId_t NONE = 0;
static const ActionId_t DUMP_MRAM = 1;
@ -50,12 +49,12 @@ public:
void completionFailedReceived(ActionId_t actionId, ReturnValue_t returnCode) override;
private:
static const uint32_t QUEUE_SIZE = 10;
static const uint8_t INTERFACE_ID = CLASS_ID::PLOC_MEMORY_DUMPER;
//! [EXPORT] : [COMMENT] The capacity of the MRAM amounts to 512 kB. Thus the maximum address must not be higher than 0x7d000.
//! [EXPORT] : [COMMENT] The capacity of the MRAM amounts to 512 kB. Thus the maximum address must
//! not be higher than 0x7d000.
static const ReturnValue_t MRAM_ADDRESS_TOO_HIGH = MAKE_RETURN_CODE(0xA0);
//! [EXPORT] : [COMMENT] The specified end address is lower than the start address
static const ReturnValue_t MRAM_INVALID_ADDRESS_COMBINATION = MAKE_RETURN_CODE(0xA1);

View File

@ -1,26 +1,28 @@
#include <sstream>
#include <string>
#include <fstream>
#include <filesystem>
#include "PlocSupervisorHandler.h"
#include "OBSWConfig.h"
#include <fsfw/globalfunctions/CRC.h>
#include <fsfw/datapool/PoolReadGuard.h>
#include <fsfw/globalfunctions/CRC.h>
#include <fsfw/timemanager/Clock.h>
#include <filesystem>
#include <fstream>
#include <sstream>
#include <string>
#include "OBSWConfig.h"
PlocSupervisorHandler::PlocSupervisorHandler(object_id_t objectId, object_id_t uartComIFid,
CookieIF * comCookie) :
DeviceHandlerBase(objectId, uartComIFid, comCookie), hkset(this), bootStatusReport(this), latchupStatusReport(
this) {
CookieIF* comCookie)
: DeviceHandlerBase(objectId, uartComIFid, comCookie),
hkset(this),
bootStatusReport(this),
latchupStatusReport(this) {
if (comCookie == NULL) {
sif::error << "PlocSupervisorHandler: Invalid com cookie" << std::endl;
}
}
PlocSupervisorHandler::~PlocSupervisorHandler() {
}
PlocSupervisorHandler::~PlocSupervisorHandler() {}
ReturnValue_t PlocSupervisorHandler::initialize() {
ReturnValue_t result = RETURN_OK;
@ -41,7 +43,6 @@ ReturnValue_t PlocSupervisorHandler::initialize() {
return result;
}
void PlocSupervisorHandler::doStartUp() {
#if OBSW_SWITCH_TO_NORMAL_MODE_AFTER_STARTUP == 1
setMode(MODE_NORMAL);
@ -50,22 +51,18 @@ void PlocSupervisorHandler::doStartUp(){
#endif
}
void PlocSupervisorHandler::doShutDown(){
setMode(_MODE_POWER_DOWN);
}
void PlocSupervisorHandler::doShutDown() { setMode(_MODE_POWER_DOWN); }
ReturnValue_t PlocSupervisorHandler::buildNormalDeviceCommand(
DeviceCommandId_t * id) {
ReturnValue_t PlocSupervisorHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) {
return NOTHING_TO_SEND;
}
ReturnValue_t PlocSupervisorHandler::buildTransitionDeviceCommand(
DeviceCommandId_t * id){
ReturnValue_t PlocSupervisorHandler::buildTransitionDeviceCommand(DeviceCommandId_t* id) {
return NOTHING_TO_SEND;
}
ReturnValue_t PlocSupervisorHandler::buildCommandFromCommand(
DeviceCommandId_t deviceCommand, const uint8_t * commandData,
ReturnValue_t PlocSupervisorHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
const uint8_t* commandData,
size_t commandDataLen) {
ReturnValue_t result = RETURN_FAILED;
switch (deviceCommand) {
@ -330,14 +327,12 @@ void PlocSupervisorHandler::fillCommandAndReplyMap() {
PLOC_SPV::SIZE_LATCHUP_STATUS_REPORT);
}
ReturnValue_t PlocSupervisorHandler::scanForReply(const uint8_t *start,
size_t remainingSize, DeviceCommandId_t *foundId, size_t *foundLen) {
ReturnValue_t PlocSupervisorHandler::scanForReply(const uint8_t* start, size_t remainingSize,
DeviceCommandId_t* foundId, size_t* foundLen) {
if (nextReplyId == PLOC_SPV::FIRST_MRAM_DUMP) {
*foundId = PLOC_SPV::FIRST_MRAM_DUMP;
return parseMramPackets(start, remainingSize, foundLen);
}
else if (nextReplyId == PLOC_SPV::CONSECUTIVE_MRAM_DUMP) {
} else if (nextReplyId == PLOC_SPV::CONSECUTIVE_MRAM_DUMP) {
*foundId = PLOC_SPV::CONSECUTIVE_MRAM_DUMP;
return parseMramPackets(start, remainingSize, foundLen);
}
@ -387,7 +382,6 @@ ReturnValue_t PlocSupervisorHandler::scanForReply(const uint8_t *start,
ReturnValue_t PlocSupervisorHandler::interpretDeviceReply(DeviceCommandId_t id,
const uint8_t* packet) {
ReturnValue_t result = RETURN_OK;
switch (id) {
@ -416,7 +410,8 @@ ReturnValue_t PlocSupervisorHandler::interpretDeviceReply(DeviceCommandId_t id,
break;
}
default: {
sif::debug << "PlocSupervisorHandler::interpretDeviceReply: Unknown device reply id" << std::endl;
sif::debug << "PlocSupervisorHandler::interpretDeviceReply: Unknown device reply id"
<< std::endl;
return DeviceHandlerIF::UNKNOWN_DEVICE_REPLY;
}
}
@ -424,17 +419,12 @@ ReturnValue_t PlocSupervisorHandler::interpretDeviceReply(DeviceCommandId_t id,
return result;
}
void PlocSupervisorHandler::setNormalDatapoolEntriesInvalid(){
void PlocSupervisorHandler::setNormalDatapoolEntriesInvalid() {}
}
uint32_t PlocSupervisorHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo){
return 500;
}
uint32_t PlocSupervisorHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
ReturnValue_t PlocSupervisorHandler::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
LocalDataPoolManager& poolManager) {
localDataPoolMap.emplace(PLOC_SPV::NUM_TMS, new PoolEntry<uint32_t>({0}));
localDataPoolMap.emplace(PLOC_SPV::TEMP_PS, new PoolEntry<uint32_t>({0}));
localDataPoolMap.emplace(PLOC_SPV::TEMP_PL, new PoolEntry<uint32_t>({0}));
@ -478,9 +468,9 @@ ReturnValue_t PlocSupervisorHandler::initializeLocalDataPool(localpool::DataPool
}
ReturnValue_t PlocSupervisorHandler::enableReplyInReplyMap(DeviceCommandMap::iterator command,
uint8_t expectedReplies, bool useAlternateId,
uint8_t expectedReplies,
bool useAlternateId,
DeviceCommandId_t alternateReplyID) {
ReturnValue_t result = RETURN_OK;
uint8_t enabledReplies = 0;
@ -585,15 +575,15 @@ ReturnValue_t PlocSupervisorHandler::enableReplyInReplyMap(DeviceCommandMap::ite
* Every command causes at least one acknowledgment and one execution report. Therefore both
* replies will be enabled here.
*/
result = DeviceHandlerBase::enableReplyInReplyMap(command, enabledReplies, true,
PLOC_SPV::ACK_REPORT);
result =
DeviceHandlerBase::enableReplyInReplyMap(command, enabledReplies, true, PLOC_SPV::ACK_REPORT);
if (result != RETURN_OK) {
sif::debug << "PlocSupervisorHandler::enableReplyInReplyMap: Reply with id "
<< PLOC_SPV::ACK_REPORT << " not in replyMap" << std::endl;
}
result = DeviceHandlerBase::enableReplyInReplyMap(command, enabledReplies, true,
PLOC_SPV::EXE_REPORT);
result =
DeviceHandlerBase::enableReplyInReplyMap(command, enabledReplies, true, PLOC_SPV::EXE_REPORT);
if (result != RETURN_OK) {
sif::debug << "PlocSupervisorHandler::enableReplyInReplyMap: Reply with id "
<< PLOC_SPV::EXE_REPORT << " not in replyMap" << std::endl;
@ -603,7 +593,6 @@ ReturnValue_t PlocSupervisorHandler::enableReplyInReplyMap(DeviceCommandMap::ite
}
ReturnValue_t PlocSupervisorHandler::verifyPacket(const uint8_t* start, size_t foundLen) {
uint16_t receivedCrc = *(start + foundLen - 2) << 8 | *(start + foundLen - 1);
uint16_t recalculatedCrc = CRC::crc16ccitt(start, foundLen - 2);
@ -616,7 +605,6 @@ ReturnValue_t PlocSupervisorHandler::verifyPacket(const uint8_t* start, size_t f
}
ReturnValue_t PlocSupervisorHandler::handleAckReport(const uint8_t* data) {
ReturnValue_t result = RETURN_OK;
result = verifyPacket(data, PLOC_SPV::SIZE_ACK_REPORT);
@ -635,7 +623,8 @@ ReturnValue_t PlocSupervisorHandler::handleAckReport(const uint8_t* data) {
switch (apid) {
case PLOC_SPV::APID_ACK_FAILURE: {
// TODO: Interpretation of status field in acknowledgment report
sif::debug << "PlocSupervisorHandler::handleAckReport: Received Ack failure report" << std::endl;
sif::debug << "PlocSupervisorHandler::handleAckReport: Received Ack failure report"
<< std::endl;
DeviceCommandId_t commandId = getPendingCommand();
if (commandId != DeviceHandlerIF::NO_COMMAND_ID) {
triggerEvent(SUPV_ACK_FAILURE, commandId);
@ -651,7 +640,8 @@ ReturnValue_t PlocSupervisorHandler::handleAckReport(const uint8_t* data) {
break;
}
default: {
sif::debug << "PlocSupervisorHandler::handleAckReport: Invalid APID in Ack report" << std::endl;
sif::debug << "PlocSupervisorHandler::handleAckReport: Invalid APID in Ack report"
<< std::endl;
result = RETURN_FAILED;
break;
}
@ -661,7 +651,6 @@ ReturnValue_t PlocSupervisorHandler::handleAckReport(const uint8_t* data) {
}
ReturnValue_t PlocSupervisorHandler::handleExecutionReport(const uint8_t* data) {
ReturnValue_t result = RETURN_OK;
result = verifyPacket(data, PLOC_SPV::SIZE_EXE_REPORT);
@ -679,14 +668,15 @@ ReturnValue_t PlocSupervisorHandler::handleExecutionReport(const uint8_t* data)
}
case (PLOC_SPV::APID_EXE_FAILURE): {
// TODO: Interpretation of status field in execution report
sif::error << "PlocSupervisorHandler::handleExecutionReport: Received execution failure report"
sif::error
<< "PlocSupervisorHandler::handleExecutionReport: Received execution failure report"
<< std::endl;
DeviceCommandId_t commandId = getPendingCommand();
if (commandId != DeviceHandlerIF::NO_COMMAND_ID) {
triggerEvent(SUPV_EXE_FAILURE, commandId);
}
else {
sif::debug << "PlocSupervisorHandler::handleExecutionReport: Unknown command id" << std::endl;
} else {
sif::debug << "PlocSupervisorHandler::handleExecutionReport: Unknown command id"
<< std::endl;
}
sendFailureReport(PLOC_SPV::EXE_REPORT, RECEIVED_EXE_FAILURE);
disableExeReportReply();
@ -706,43 +696,41 @@ ReturnValue_t PlocSupervisorHandler::handleExecutionReport(const uint8_t* data)
}
ReturnValue_t PlocSupervisorHandler::handleHkReport(const uint8_t* data) {
ReturnValue_t result = RETURN_OK;
result = verifyPacket(data, PLOC_SPV::SIZE_HK_REPORT);
if (result == CRC_FAILURE) {
sif::error << "PlocSupervisorHandler::handleHkReport: Hk report has invalid crc"
<< std::endl;
sif::error << "PlocSupervisorHandler::handleHkReport: Hk report has invalid crc" << std::endl;
}
uint16_t offset = PLOC_SPV::DATA_FIELD_OFFSET;
hkset.tempPs = *(data + offset) << 24 | *(data + offset + 1) << 16 | *(data + offset + 2) << 8
| *(data + offset + 3);
hkset.tempPs = *(data + offset) << 24 | *(data + offset + 1) << 16 | *(data + offset + 2) << 8 |
*(data + offset + 3);
offset += 4;
hkset.tempPl = *(data + offset) << 24 | *(data + offset + 1) << 16 | *(data + offset + 2) << 8
| *(data + offset + 3);
hkset.tempPl = *(data + offset) << 24 | *(data + offset + 1) << 16 | *(data + offset + 2) << 8 |
*(data + offset + 3);
offset += 4;
hkset.tempSup = *(data + offset) << 24 | *(data + offset + 1) << 16 | *(data + offset + 2) << 8
| *(data + offset + 3);
hkset.tempSup = *(data + offset) << 24 | *(data + offset + 1) << 16 | *(data + offset + 2) << 8 |
*(data + offset + 3);
offset += 4;
hkset.uptime = *(data + offset) << 24 | *(data + offset + 1) << 16 | *(data + offset + 2) << 8
| *(data + offset + 3);
hkset.uptime = *(data + offset) << 24 | *(data + offset + 1) << 16 | *(data + offset + 2) << 8 |
*(data + offset + 3);
offset += 4;
hkset.cpuLoad = *(data + offset) << 24 | *(data + offset + 1) << 16 | *(data + offset + 2) << 8
| *(data + offset + 3);
hkset.cpuLoad = *(data + offset) << 24 | *(data + offset + 1) << 16 | *(data + offset + 2) << 8 |
*(data + offset + 3);
offset += 4;
hkset.availableHeap = *(data + offset) << 24 | *(data + offset + 1) << 16 | *(data + offset + 2) << 8
| *(data + offset + 3);
hkset.availableHeap = *(data + offset) << 24 | *(data + offset + 1) << 16 |
*(data + offset + 2) << 8 | *(data + offset + 3);
offset += 4;
hkset.numTcs = *(data + offset) << 24 | *(data + offset + 1) << 16 | *(data + offset + 2) << 8
| *(data + offset + 3);
hkset.numTcs = *(data + offset) << 24 | *(data + offset + 1) << 16 | *(data + offset + 2) << 8 |
*(data + offset + 3);
offset += 4;
hkset.numTms = *(data + offset) << 24 | *(data + offset + 1) << 16 | *(data + offset + 2) << 8
| *(data + offset + 3);
hkset.numTms = *(data + offset) << 24 | *(data + offset + 1) << 16 | *(data + offset + 2) << 8 |
*(data + offset + 3);
offset += 4;
hkset.socState = *(data + offset) << 24 | *(data + offset + 1) << 16 | *(data + offset + 2) << 8
| *(data + offset + 3);
hkset.socState = *(data + offset) << 24 | *(data + offset + 1) << 16 | *(data + offset + 2) << 8 |
*(data + offset + 3);
offset += 4;
hkset.nvm0_1_state = *(data + offset);
offset += 1;
@ -761,7 +749,8 @@ ReturnValue_t PlocSupervisorHandler::handleHkReport(const uint8_t* data) {
sif::info << "PlocSupervisorHandler::handleHkReport: temp_sup: " << hkset.tempSup << std::endl;
sif::info << "PlocSupervisorHandler::handleHkReport: uptime: " << hkset.uptime << std::endl;
sif::info << "PlocSupervisorHandler::handleHkReport: cpu_load: " << hkset.cpuLoad << std::endl;
sif::info << "PlocSupervisorHandler::handleHkReport: available_heap: " << hkset.availableHeap << std::endl;
sif::info << "PlocSupervisorHandler::handleHkReport: available_heap: " << hkset.availableHeap
<< std::endl;
sif::info << "PlocSupervisorHandler::handleHkReport: num_tcs: " << hkset.numTcs << std::endl;
sif::info << "PlocSupervisorHandler::handleHkReport: num_tms: " << hkset.numTms << std::endl;
sif::info << "PlocSupervisorHandler::handleHkReport: soc_state: " << hkset.socState << std::endl;
@ -780,14 +769,14 @@ ReturnValue_t PlocSupervisorHandler::handleHkReport(const uint8_t* data) {
}
ReturnValue_t PlocSupervisorHandler::handleBootStatusReport(const uint8_t* data) {
ReturnValue_t result = RETURN_OK;
result = verifyPacket(data, PLOC_SPV::SIZE_BOOT_STATUS_REPORT);
if (result == CRC_FAILURE) {
sif::error << "PlocSupervisorHandler::handleBootStatusReport: Boot status report has invalid"
" crc" << std::endl;
" crc"
<< std::endl;
return result;
}
@ -835,7 +824,6 @@ ReturnValue_t PlocSupervisorHandler::handleBootStatusReport(const uint8_t* data)
}
ReturnValue_t PlocSupervisorHandler::handleLatchupStatusReport(const uint8_t* data) {
ReturnValue_t result = RETURN_OK;
result = verifyPacket(data, PLOC_SPV::SIZE_LATCHUP_STATUS_REPORT);
@ -921,8 +909,8 @@ ReturnValue_t PlocSupervisorHandler::handleLatchupStatusReport(const uint8_t* da
<< latchupStatusReport.timeYear << std::endl;
sif::info << "PlocSupervisorHandler::handleLatchupStatusReport: Msec: "
<< latchupStatusReport.timeMsec << std::endl;
sif::info << "PlocSupervisorHandler::handleLatchupStatusReport: isSet: 0x"
<< std::hex << latchupStatusReport.timeMsec << std::dec << std::endl;
sif::info << "PlocSupervisorHandler::handleLatchupStatusReport: isSet: 0x" << std::hex
<< latchupStatusReport.timeMsec << std::dec << std::endl;
#endif
return result;
@ -953,15 +941,13 @@ void PlocSupervisorHandler::setNextReplyId() {
}
size_t PlocSupervisorHandler::getNextReplyLength(DeviceCommandId_t commandId) {
size_t replyLen = 0;
if (nextReplyId == PLOC_SPV::NONE) {
return replyLen;
}
if (nextReplyId == PLOC_SPV::FIRST_MRAM_DUMP
|| nextReplyId == PLOC_SPV::CONSECUTIVE_MRAM_DUMP) {
if (nextReplyId == PLOC_SPV::FIRST_MRAM_DUMP || nextReplyId == PLOC_SPV::CONSECUTIVE_MRAM_DUMP) {
/**
* Try to read 20 MRAM packets. If reply is larger, the packets will be read with the
* next doSendRead call. The command will be as long active as the packet with the sequence
@ -978,8 +964,7 @@ size_t PlocSupervisorHandler::getNextReplyLength(DeviceCommandId_t commandId){
return replyLen;
}
replyLen = iter->second.replyLen;
}
else {
} else {
sif::debug << "PlocSupervisorHandler::getNextReplyLength: No entry for reply with reply id "
<< std::hex << nextReplyId << " in deviceReplyMap" << std::endl;
}
@ -987,8 +972,8 @@ size_t PlocSupervisorHandler::getNextReplyLength(DeviceCommandId_t commandId){
return replyLen;
}
void PlocSupervisorHandler::handleDeviceTM(const uint8_t* data, size_t dataSize, DeviceCommandId_t replyId) {
void PlocSupervisorHandler::handleDeviceTM(const uint8_t* data, size_t dataSize,
DeviceCommandId_t replyId) {
ReturnValue_t result = RETURN_OK;
if (wiretappingMode == RAW) {
@ -1043,8 +1028,8 @@ void PlocSupervisorHandler::prepareDisableHk() {
}
void PlocSupervisorHandler::prepareSetBootTimeoutCmd(const uint8_t* commandData) {
uint32_t timeout = *(commandData) << 24 | *(commandData + 1) << 16 | *(commandData + 2) << 8
| *(commandData + 3);
uint32_t timeout = *(commandData) << 24 | *(commandData + 1) << 16 | *(commandData + 2) << 8 |
*(commandData + 3);
PLOC_SPV::SetBootTimeout packet(timeout);
packetToOutBuffer(packet.getWholeData(), packet.getFullSize());
}
@ -1073,8 +1058,8 @@ ReturnValue_t PlocSupervisorHandler::prepareWatchdogsConfigTimeoutCmd(const uint
if (watchdog > 2) {
return INVALID_WATCHDOG;
}
uint32_t timeout = *(commandData + offset) << 24 | *(commandData + offset + 1) << 16
| *(commandData + offset + 2) << 8 | *(commandData + offset + 3);
uint32_t timeout = *(commandData + offset) << 24 | *(commandData + offset + 1) << 16 |
*(commandData + offset + 2) << 8 | *(commandData + offset + 3);
if (timeout < 1000 || timeout > 360000) {
return INVALID_WATCHDOG_TIMEOUT;
}
@ -1115,8 +1100,8 @@ ReturnValue_t PlocSupervisorHandler::prepareAutoCalibrateAlertCmd(const uint8_t*
uint8_t offset = 0;
uint8_t latchupId = *commandData;
offset += 1;
uint32_t mg = *(commandData + offset) << 24 | *(commandData + offset + 1) << 16
| *(commandData + offset + 2) << 8 | *(commandData + offset + 3);
uint32_t mg = *(commandData + offset) << 24 | *(commandData + offset + 1) << 16 |
*(commandData + offset + 2) << 8 | *(commandData + offset + 3);
if (latchupId > 6) {
return INVALID_LATCHUP_ID;
}
@ -1141,8 +1126,8 @@ ReturnValue_t PlocSupervisorHandler::prepareSetAlertLimitCmd(const uint8_t* comm
uint8_t offset = 0;
uint8_t latchupId = *commandData;
offset += 1;
uint32_t dutycycle = *(commandData + offset) << 24 | *(commandData + offset + 1) << 16
| *(commandData + offset + 2) << 8 | *(commandData + offset + 3);
uint32_t dutycycle = *(commandData + offset) << 24 | *(commandData + offset + 1) << 16 |
*(commandData + offset + 2) << 8 | *(commandData + offset + 3);
if (latchupId > 6) {
return INVALID_LATCHUP_ID;
}
@ -1152,8 +1137,8 @@ ReturnValue_t PlocSupervisorHandler::prepareSetAlertLimitCmd(const uint8_t* comm
}
ReturnValue_t PlocSupervisorHandler::prepareSetAdcSweetPeriodCmd(const uint8_t* commandData) {
uint32_t sweepPeriod = *(commandData) << 24 | *(commandData + 1) << 16
| *(commandData + 2) << 8 | *(commandData + 3);
uint32_t sweepPeriod = *(commandData) << 24 | *(commandData + 1) << 16 | *(commandData + 2) << 8 |
*(commandData + 3);
if (sweepPeriod < 21) {
return SWEEP_PERIOD_TOO_SMALL;
}
@ -1178,8 +1163,8 @@ void PlocSupervisorHandler::prepareSetAdcWindowAndStrideCmd(const uint8_t* comma
}
void PlocSupervisorHandler::prepareSetAdcThresholdCmd(const uint8_t* commandData) {
uint32_t threshold = *(commandData) << 24 | *(commandData + 1) << 16 | *(commandData + 2) << 8
| *(commandData + 3);
uint32_t threshold = *(commandData) << 24 | *(commandData + 1) << 16 | *(commandData + 2) << 8 |
*(commandData + 3);
PLOC_SPV::SetAdcThreshold packet(threshold);
packetToOutBuffer(packet.getWholeData(), packet.getFullSize());
}
@ -1275,7 +1260,6 @@ void PlocSupervisorHandler::packetToOutBuffer(uint8_t* packetData, size_t fullSi
}
void PlocSupervisorHandler::disableAllReplies() {
DeviceReplyMap::iterator iter;
/* Disable ack reply */
@ -1305,7 +1289,6 @@ void PlocSupervisorHandler::disableAllReplies() {
}
void PlocSupervisorHandler::sendFailureReport(DeviceCommandId_t replyId, ReturnValue_t status) {
DeviceReplyIter iter = deviceReplyMap.find(replyId);
if (iter == deviceReplyMap.end()) {
@ -1316,7 +1299,8 @@ void PlocSupervisorHandler::sendFailureReport(DeviceCommandId_t replyId, ReturnV
DeviceCommandInfo* info = &(iter->second.command->second);
if (info == nullptr) {
sif::debug << "PlocSupervisorHandler::sendFailureReport: Reply has no active command" << std::endl;
sif::debug << "PlocSupervisorHandler::sendFailureReport: Reply has no active command"
<< std::endl;
return;
}
@ -1367,7 +1351,6 @@ ReturnValue_t PlocSupervisorHandler::parseMramPackets(const uint8_t *packet, siz
}
ReturnValue_t PlocSupervisorHandler::handleMramDumpPacket(DeviceCommandId_t id) {
ReturnValue_t result = RETURN_FAILED;
// Prepare packet for downlink
@ -1380,8 +1363,7 @@ ReturnValue_t PlocSupervisorHandler::handleMramDumpPacket(DeviceCommandId_t id)
}
handleMramDumpFile(id);
if (downlinkMramDump == true) {
handleDeviceTM(spacePacketBuffer + PLOC_SPV::SPACE_PACKET_HEADER_LENGTH, packetLen - 1,
id);
handleDeviceTM(spacePacketBuffer + PLOC_SPV::SPACE_PACKET_HEADER_LENGTH, packetLen - 1, id);
}
packetInBuffer = false;
receivedMramDumpPackets++;
@ -1426,16 +1408,15 @@ void PlocSupervisorHandler::increaseExpectedMramReplies(DeviceCommandId_t id) {
return;
}
uint8_t sequenceFlags = spacePacketBuffer[2] >> 6;
if (sequenceFlags != static_cast<uint8_t>(PLOC_SPV::SequenceFlags::LAST_PKT)
&& (sequenceFlags != static_cast<uint8_t>(PLOC_SPV::SequenceFlags::STANDALONE_PKT))) {
if (sequenceFlags != static_cast<uint8_t>(PLOC_SPV::SequenceFlags::LAST_PKT) &&
(sequenceFlags != static_cast<uint8_t>(PLOC_SPV::SequenceFlags::STANDALONE_PKT))) {
// Command expects at least one MRAM packet more and the execution report
info->expectedReplies = 2;
// Wait maximum of 2 cycles for next MRAM packet
mramReplyInfo->delayCycles = 2;
// Also adapting delay cycles for execution report
exeReplyInfo->delayCycles = 3;
}
else {
} else {
// Command expects the execution report
info->expectedReplies = 1;
mramReplyInfo->delayCycles = 0;
@ -1456,8 +1437,8 @@ ReturnValue_t PlocSupervisorHandler::handleMramDumpFile(DeviceCommandId_t id) {
uint16_t packetLen = readSpacePacketLength(spacePacketBuffer);
uint8_t sequenceFlags = readSequenceFlags(spacePacketBuffer);
if (id == PLOC_SPV::FIRST_MRAM_DUMP) {
if (sequenceFlags == static_cast<uint8_t>(PLOC_SPV::SequenceFlags::FIRST_PKT)
|| (sequenceFlags == static_cast<uint8_t>(PLOC_SPV::SequenceFlags::STANDALONE_PKT))) {
if (sequenceFlags == static_cast<uint8_t>(PLOC_SPV::SequenceFlags::FIRST_PKT) ||
(sequenceFlags == static_cast<uint8_t>(PLOC_SPV::SequenceFlags::STANDALONE_PKT))) {
result = createMramDumpFile();
if (result != RETURN_OK) {
return result;
@ -1523,8 +1504,8 @@ ReturnValue_t PlocSupervisorHandler::getTimeStampString(std::string& timeStamp)
<< std::endl;
return GET_TIME_FAILURE;
}
timeStamp = std::to_string(time.year) + "-" + std::to_string(time.month) + "-"
+ std::to_string(time.day) + "--" + std::to_string(time.hour) + "-"
+ std::to_string(time.minute) + "-" + std::to_string(time.second);
timeStamp = std::to_string(time.year) + "-" + std::to_string(time.month) + "-" +
std::to_string(time.day) + "--" + std::to_string(time.hour) + "-" +
std::to_string(time.minute) + "-" + std::to_string(time.second);
return RETURN_OK;
}

View File

@ -1,12 +1,12 @@
#ifndef MISSION_DEVICES_PLOCSUPERVISORHANDLER_H_
#define MISSION_DEVICES_PLOCSUPERVISORHANDLER_H_
#include "devicedefinitions/PlocSupervisorDefinitions.h"
#include <bsp_q7s/memory/SdCardManager.h>
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
#include <fsfw_hal/linux/uart/UartComIF.h>
#include "devicedefinitions/PlocSupervisorDefinitions.h"
/**
* @brief This is the device handler for the supervisor of the PLOC which is programmed by
* Thales.
@ -21,7 +21,6 @@
*/
class PlocSupervisorHandler : public DeviceHandlerBase {
public:
PlocSupervisorHandler(object_id_t objectId, object_id_t uartComIFid, CookieIF* comCookie);
virtual ~PlocSupervisorHandler();
@ -33,12 +32,11 @@ protected:
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t* id) override;
ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t* id) override;
void fillCommandAndReplyMap() override;
ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand,
const uint8_t * commandData,size_t commandDataLen) override;
ReturnValue_t scanForReply(const uint8_t *start, size_t remainingSize,
DeviceCommandId_t *foundId, size_t *foundLen) override;
ReturnValue_t interpretDeviceReply(DeviceCommandId_t id,
const uint8_t *packet) override;
ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t* commandData,
size_t commandDataLen) override;
ReturnValue_t scanForReply(const uint8_t* start, size_t remainingSize, DeviceCommandId_t* foundId,
size_t* foundLen) override;
ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) override;
void setNormalDatapoolEntriesInvalid() override;
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
@ -49,7 +47,6 @@ protected:
size_t getNextReplyLength(DeviceCommandId_t deviceCommand) override;
private:
static const uint8_t INTERFACE_ID = CLASS_ID::PLOC_SUPERVISOR_HANDLER;
//! [EXPORT] : [COMMENT] Space Packet received from PLOC supervisor has invalid CRC
@ -64,25 +61,32 @@ private:
static const ReturnValue_t GET_TIME_FAILURE = MAKE_RETURN_CODE(0xA4);
//! [EXPORT] : [COMMENT] Invalid communication interface specified
static const ReturnValue_t INVALID_UART_COM_IF = MAKE_RETURN_CODE(0xA5);
//! [EXPORT] : [COMMENT] Received command with invalid watchdog parameter. Valid watchdogs are 0 for PS, 1 for PL and 2 for INT
//! [EXPORT] : [COMMENT] Received command with invalid watchdog parameter. Valid watchdogs are 0
//! for PS, 1 for PL and 2 for INT
static const ReturnValue_t INVALID_WATCHDOG = MAKE_RETURN_CODE(0xA6);
//! [EXPORT] : [COMMENT] Received watchdog timeout config command with invalid timeout. Valid timeouts must be in the range between 1000 and 360000 ms.
//! [EXPORT] : [COMMENT] Received watchdog timeout config command with invalid timeout. Valid
//! timeouts must be in the range between 1000 and 360000 ms.
static const ReturnValue_t INVALID_WATCHDOG_TIMEOUT = MAKE_RETURN_CODE(0xA7);
//! [EXPORT] : [COMMENT] Received latchup config command with invalid latchup ID
static const ReturnValue_t INVALID_LATCHUP_ID = MAKE_RETURN_CODE(0xA8);
//! [EXPORT] : [COMMENT] Received set adc sweep period command with invalid sweep period. Must be larger than 21.
//! [EXPORT] : [COMMENT] Received set adc sweep period command with invalid sweep period. Must be
//! larger than 21.
static const ReturnValue_t SWEEP_PERIOD_TOO_SMALL = MAKE_RETURN_CODE(0xA9);
//! [EXPORT] : [COMMENT] Receive auto EM test command with invalid test param. Valid params are 1 and 2.
//! [EXPORT] : [COMMENT] Receive auto EM test command with invalid test param. Valid params are 1
//! and 2.
static const ReturnValue_t INVALID_TEST_PARAM = MAKE_RETURN_CODE(0xAA);
//! [EXPORT] : [COMMENT] Returned when scanning for MRAM dump packets failed.
static const ReturnValue_t MRAM_PACKET_PARSING_FAILURE = MAKE_RETURN_CODE(0xAB);
//! [EXPORT] : [COMMENT] Returned when the start and stop addresses of the MRAM dump or MRAM wipe commands are invalid (e.g. start address bigger than stop address)
//! [EXPORT] : [COMMENT] Returned when the start and stop addresses of the MRAM dump or MRAM wipe
//! commands are invalid (e.g. start address bigger than stop address)
static const ReturnValue_t INVALID_MRAM_ADDRESSES = MAKE_RETURN_CODE(0xAC);
//! [EXPORT] : [COMMENT] Expect reception of an MRAM dump packet but received space packet with other apid.
//! [EXPORT] : [COMMENT] Expect reception of an MRAM dump packet but received space packet with
//! other apid.
static const ReturnValue_t NO_MRAM_PACKET = MAKE_RETURN_CODE(0xAD);
//! [EXPORT] : [COMMENT] Path to PLOC directory on SD card does not exist
static const ReturnValue_t PATH_DOES_NOT_EXIST = MAKE_RETURN_CODE(0xAE);
//! [EXPORT] : [COMMENT] MRAM dump file does not exists. The file should actually already have been created with the reception of the first dump packet.
//! [EXPORT] : [COMMENT] MRAM dump file does not exists. The file should actually already have
//! been created with the reception of the first dump packet.
static const ReturnValue_t MRAM_FILE_NOT_EXISTS = MAKE_RETURN_CODE(0xAF);
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PLOC_SUPERVISOR_HANDLER;
@ -258,7 +262,6 @@ private:
void prepareSetGpioCmd(const uint8_t* commandData);
void prepareReadGpioCmd(const uint8_t* commandData);
/**
* @brief Copies the content of a space packet to the command buffer.
*/

View File

@ -1,17 +1,19 @@
#include "fsfw/ipc/QueueFactory.h"
#include "PlocUpdater.h"
#include <fstream>
#include <filesystem>
#include <fstream>
#include <string>
PlocUpdater::PlocUpdater(object_id_t objectId) :
SystemObject(objectId), commandActionHelper(this), actionHelper(this, nullptr) {
commandQueue = QueueFactory::instance()->createMessageQueue(QUEUE_SIZE);
#include "fsfw/ipc/QueueFactory.h"
PlocUpdater::PlocUpdater(object_id_t objectId)
: SystemObject(objectId), commandActionHelper(this), actionHelper(this, nullptr) {
auto mqArgs = MqArgs(this->getObjectId());
commandQueue = QueueFactory::instance()->createMessageQueue(
QUEUE_SIZE, MessageQueueMessage::MAX_MESSAGE_SIZE, &mqArgs);
}
PlocUpdater::~PlocUpdater() {
}
PlocUpdater::~PlocUpdater() {}
ReturnValue_t PlocUpdater::initialize() {
#if BOARD_TE0720 == 0
@ -39,8 +41,8 @@ ReturnValue_t PlocUpdater::performOperation(uint8_t operationCode) {
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t PlocUpdater::executeAction(ActionId_t actionId,
MessageQueueId_t commandedBy, const uint8_t* data, size_t size) {
ReturnValue_t PlocUpdater::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t* data, size_t size) {
ReturnValue_t result = RETURN_FAILED;
if (state != State::IDLE) {
@ -99,13 +101,9 @@ ReturnValue_t PlocUpdater::executeAction(ActionId_t actionId,
return EXECUTION_FINISHED;
}
MessageQueueId_t PlocUpdater::getCommandQueue() const {
return commandQueue->getId();
}
MessageQueueId_t PlocUpdater::getCommandQueue() const { return commandQueue->getId(); }
MessageQueueIF* PlocUpdater::getCommandQueuePtr() {
return commandQueue;
}
MessageQueueIF* PlocUpdater::getCommandQueuePtr() { return commandQueue; }
void PlocUpdater::readCommandQueue() {
CommandMessage message;
@ -167,19 +165,19 @@ ReturnValue_t PlocUpdater::getImageLocation(const uint8_t* data, size_t size) {
#if BOARD_TE0720 == 0
// Check if file is stored on SD card and if associated SD card is mounted
if (std::string(reinterpret_cast<const char*>(data), SD_PREFIX_LENGTH) == std::string(SdCardManager::SD_0_MOUNT_POINT)) {
if (!isSdCardMounted(sd::SLOT_0)) {
sif::warning << "PlocUpdater::prepareNvm0AUpdate: SD card 0 not mounted" << std::endl;
if (std::string(reinterpret_cast<const char*>(data), SD_PREFIX_LENGTH) ==
std::string(SdCardManager::SD_0_MOUNT_POINT)) {
if (!sdcMan->isSdCardMounted(sd::SLOT_0)) {
sif::warning << "PlocUpdater::getImageLocation: SD card 0 not mounted" << std::endl;
return SD_NOT_MOUNTED;
}
}
else if (std::string(reinterpret_cast<const char*>(data), SD_PREFIX_LENGTH) == std::string(SdCardManager::SD_1_MOUNT_POINT)) {
if (!isSdCardMounted(sd::SLOT_0)) {
sif::warning << "PlocUpdater::prepareNvm0AUpdate: SD card 1 not mounted" << std::endl;
} else if (std::string(reinterpret_cast<const char*>(data), SD_PREFIX_LENGTH) ==
std::string(SdCardManager::SD_1_MOUNT_POINT)) {
if (!sdcMan->isSdCardMounted(sd::SLOT_0)) {
sif::warning << "PlocUpdater::getImageLocation: SD card 1 not mounted" << std::endl;
return SD_NOT_MOUNTED;
}
}
else {
} else {
// update image not stored on SD card
}
#endif /* BOARD_TE0720 == 0 */
@ -193,48 +191,11 @@ ReturnValue_t PlocUpdater::getImageLocation(const uint8_t* data, size_t size) {
return RETURN_OK;
}
#if BOARD_TE0720 == 0
bool PlocUpdater::isSdCardMounted(sd::SdCard sdCard) {
SdCardManager::SdStatePair active;
ReturnValue_t result = sdcMan->getSdCardActiveStatus(active);
if (result != RETURN_OK) {
sif::debug << "PlocUpdater::isSdCardMounted: Failed to get SD card active state";
return false;
}
if (sdCard == sd::SLOT_0) {
if (active.first == sd::MOUNTED) {
return true;
}
else {
return false;
}
}
else if (sdCard == sd::SLOT_1) {
if (active.second == sd::MOUNTED) {
return true;
}
else {
return false;
}
}
else {
sif::debug << "PlocUpdater::isSdCardMounted: Unknown SD card specified" << std::endl;
}
return false;
}
#endif /* #if BOARD_TE0720 == 0 */
void PlocUpdater::stepSuccessfulReceived(ActionId_t actionId, uint8_t step) {}
void PlocUpdater::stepSuccessfulReceived(ActionId_t actionId,
uint8_t step) {
}
void PlocUpdater::stepFailedReceived(ActionId_t actionId, uint8_t step, ReturnValue_t returnCode) {}
void PlocUpdater::stepFailedReceived(ActionId_t actionId, uint8_t step,
ReturnValue_t returnCode) {
}
void PlocUpdater::dataReceived(ActionId_t actionId, const uint8_t* data, uint32_t size) {
}
void PlocUpdater::dataReceived(ActionId_t actionId, const uint8_t* data, uint32_t size) {}
void PlocUpdater::completionSuccessfulReceived(ActionId_t actionId) {
switch (pendingCommand) {
@ -245,8 +206,7 @@ void PlocUpdater::completionSuccessfulReceived(ActionId_t actionId) {
if (remainingPackets == 0) {
packetsSent = 0; // Reset packets sent variable for next update sequence
state = State::UPDATE_VERIFY;
}
else {
} else {
state = State::UPDATE_TRANSFER;
}
break;
@ -263,8 +223,7 @@ void PlocUpdater::completionSuccessfulReceived(ActionId_t actionId) {
}
}
void PlocUpdater::completionFailedReceived(ActionId_t actionId,
ReturnValue_t returnCode) {
void PlocUpdater::completionFailedReceived(ActionId_t actionId, ReturnValue_t returnCode) {
switch (pendingCommand) {
case (PLOC_SPV::UPDATE_AVAILABLE): {
triggerEvent(UPDATE_AVAILABLE_FAILED);
@ -279,8 +238,7 @@ void PlocUpdater::completionFailedReceived(ActionId_t actionId,
break;
}
default:
sif::debug << "PlocUpdater::completionFailedReceived: Invalid pending command "
<< std::endl;
sif::debug << "PlocUpdater::completionFailedReceived: Invalid pending command " << std::endl;
break;
}
state = State::IDLE;
@ -311,10 +269,12 @@ void PlocUpdater::commandUpdateAvailable() {
calcImageCrc();
PLOC_SPV::UpdateInfo packet(PLOC_SPV::APID_UPDATE_AVAILABLE, static_cast<uint8_t>(image),
static_cast<uint8_t>(partition), imageSize, imageCrc, numOfUpdatePackets);
static_cast<uint8_t>(partition), imageSize, imageCrc,
numOfUpdatePackets);
result = commandActionHelper.commandAction(objects::PLOC_SUPERVISOR_HANDLER,
PLOC_SPV::UPDATE_AVAILABLE, packet.getWholeData(), packet.getFullSize());
PLOC_SPV::UPDATE_AVAILABLE, packet.getWholeData(),
packet.getFullSize());
if (result != RETURN_OK) {
sif::warning << "PlocUpdater::commandUpdateAvailable: Failed to send update available"
<< " packet to supervisor handler" << std::endl;
@ -344,8 +304,7 @@ void PlocUpdater::commandUpdatePacket() {
if (remainingPackets == 1) {
payloadLength = imageSize - static_cast<uint16_t>(file.tellg());
}
else {
} else {
payloadLength = MAX_SP_DATA;
}
@ -360,7 +319,8 @@ void PlocUpdater::commandUpdatePacket() {
packet.makeCrc();
result = commandActionHelper.commandAction(objects::PLOC_SUPERVISOR_HANDLER,
PLOC_SPV::UPDATE_IMAGE_DATA, packet.getWholeData(), packet.getFullSize());
PLOC_SPV::UPDATE_IMAGE_DATA, packet.getWholeData(),
packet.getFullSize());
if (result != RETURN_OK) {
sif::warning << "PlocUpdater::commandUpdateAvailable: Failed to send update"
@ -382,10 +342,12 @@ void PlocUpdater::commandUpdateVerify() {
ReturnValue_t result = RETURN_OK;
PLOC_SPV::UpdateInfo packet(PLOC_SPV::APID_UPDATE_VERIFY, static_cast<uint8_t>(image),
static_cast<uint8_t>(partition), imageSize, imageCrc, numOfUpdatePackets);
static_cast<uint8_t>(partition), imageSize, imageCrc,
numOfUpdatePackets);
result = commandActionHelper.commandAction(objects::PLOC_SUPERVISOR_HANDLER,
PLOC_SPV::UPDATE_VERIFY, packet.getWholeData(), packet.getFullSize());
result =
commandActionHelper.commandAction(objects::PLOC_SUPERVISOR_HANDLER, PLOC_SPV::UPDATE_VERIFY,
packet.getWholeData(), packet.getFullSize());
if (result != RETURN_OK) {
sif::warning << "PlocUpdater::commandUpdateAvailable: Failed to send update available"
<< " packet to supervisor handler" << std::endl;
@ -425,12 +387,9 @@ void PlocUpdater::calcImageCrc() {
void PlocUpdater::adjustSequenceFlags(PLOC_SPV::UpdatePacket& packet) {
if (packetsSent == 0) {
packet.setSequenceFlags(static_cast<uint8_t>(PLOC_SPV::SequenceFlags::FIRST_PKT));
}
else if (remainingPackets == 1) {
} else if (remainingPackets == 1) {
packet.setSequenceFlags(static_cast<uint8_t>(PLOC_SPV::SequenceFlags::LAST_PKT));
}
else {
} else {
packet.setSequenceFlags(static_cast<uint8_t>(PLOC_SPV::SequenceFlags::CONTINUED_PKT));
}
}

View File

@ -2,27 +2,25 @@
#define MISSION_DEVICES_PLOCUPDATER_H_
#include "OBSWConfig.h"
#include "bsp_q7s/memory/SdCardManager.h"
#include "devicedefinitions/PlocSupervisorDefinitions.h"
#include "fsfw/action/CommandActionHelper.h"
#include "fsfw/action/ActionHelper.h"
#include "fsfw/action/HasActionsIF.h"
#include "fsfw/action/CommandActionHelper.h"
#include "fsfw/action/CommandsActionsIF.h"
#include "fsfw/action/HasActionsIF.h"
#include "fsfw/objectmanager/SystemObject.h"
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include "fsfw/tasks/ExecutableObjectIF.h"
#include "fsfw/objectmanager/SystemObject.h"
#include "bsp_q7s/memory/SdCardManager.h"
#include "linux/fsfwconfig/objects/systemObjectList.h"
#include "fsfw/tmtcpacket/SpacePacket.h"
#include "linux/fsfwconfig/objects/systemObjectList.h"
/**
* @brief An object of this class can be used to perform the software updates of the PLOC. The
* software update will be read from one of the SD cards, split into multiple space
* packets and sent to the PlocSupervisorHandler.
*
* @details The MPSoC has two boot memories (NVM0 and NVM1) where each stores two images (Partition A
* and Partition B)
* @details The MPSoC has two boot memories (NVM0 and NVM1) where each stores two images (Partition
* A and Partition B)
*
* @author J. Meier
*/
@ -32,7 +30,6 @@ class PlocUpdater : public SystemObject,
public HasReturnvaluesIF,
public CommandsActionsIF {
public:
static const ActionId_t UPDATE_A_UBOOT = 0;
static const ActionId_t UPDATE_A_BITSTREAM = 1;
static const ActionId_t UPDATE_A_LINUX = 2;
@ -58,14 +55,14 @@ public:
void completionFailedReceived(ActionId_t actionId, ReturnValue_t returnCode) override;
private:
static const uint8_t INTERFACE_ID = CLASS_ID::PLOC_UPDATER;
//! [EXPORT] : [COMMENT] Updater is already performing an update
static const ReturnValue_t UPDATER_BUSY = MAKE_RETURN_CODE(0xA0);
//! [EXPORT] : [COMMENT] Received update command with invalid path string (too long).
static const ReturnValue_t NAME_TOO_LONG = MAKE_RETURN_CODE(0xA1);
//! [EXPORT] : [COMMENT] Received command to initiate update but SD card with update image not mounted.
//! [EXPORT] : [COMMENT] Received command to initiate update but SD card with update image not
//! mounted.
static const ReturnValue_t SD_NOT_MOUNTED = MAKE_RETURN_CODE(0xA2);
//! [EXPORT] : [COMMENT] Update file received with update command does not exist.
static const ReturnValue_t FILE_NOT_EXISTS = MAKE_RETURN_CODE(0xA3);
@ -74,13 +71,15 @@ private:
//! [EXPORT] : [COMMENT] Try to read update file but the file does not exist.
//! P1: Indicates in which state the file read fails
//! P2: During the update transfer the second parameter gives information about the number of already sent packets
//! P2: During the update transfer the second parameter gives information about the number of
//! already sent packets
static const Event UPDATE_FILE_NOT_EXISTS = MAKE_EVENT(0, severity::LOW);
//! [EXPORT] : [COMMENT] Failed to send command to supervisor handler
//! P1: Return value of CommandActionHelper::commandAction
//! P2: Action ID of command to send
static const Event ACTION_COMMANDING_FAILED = MAKE_EVENT(1, severity::LOW);
//! [EXPORT] : [COMMENT] Supervisor handler replied action message indicating a command execution failure of the update available command
//! [EXPORT] : [COMMENT] Supervisor handler replied action message indicating a command execution
//! failure of the update available command
static const Event UPDATE_AVAILABLE_FAILED = MAKE_EVENT(2, severity::LOW);
//! [EXPORT] : [COMMENT] Supervisor handler failed to transfer an update space packet.
//! P1: Parameter holds the number of update packets already sent (inclusive the failed packet)
@ -122,21 +121,11 @@ private:
ActionId_t pendingCommand = PLOC_SPV::NONE;
enum class Image: uint8_t {
NONE,
A,
B
};
enum class Image : uint8_t { NONE, A, B };
Image image = Image::NONE;
enum class Partition: uint8_t {
NONE,
UBOOT,
BITSTREAM,
LINUX_OS,
APP_SW
};
enum class Partition : uint8_t { NONE, UBOOT, BITSTREAM, LINUX_OS, APP_SW };
Partition partition = Partition::NONE;
@ -174,13 +163,6 @@ private:
*/
void commandUpdateVerify();
#if BOARD_TE0720 == 0
/**
* @brief Checks whether the SD card to read from is mounted or not.
*/
bool isSdCardMounted(sd::SdCard sdCard);
#endif
void calcImageCrc();
void adjustSequenceFlags(PLOC_SPV::UpdatePacket& packet);

View File

@ -5,18 +5,17 @@
class MemoryParams : public SerialLinkedListAdapter<SerializeIF> {
public:
/**
* @brief Constructor
* @param startAddress Start of address range to dump
* @param endAddress End of address range to dump
*/
MemoryParams(uint32_t startAddress, uint32_t endAddress) :
startAddress(startAddress), endAddress(endAddress) {
MemoryParams(uint32_t startAddress, uint32_t endAddress)
: startAddress(startAddress), endAddress(endAddress) {
setLinks();
}
private:
private:
void setLinks() {
setStart(&startAddress);
startAddress.setNext(&endAddress);
@ -24,10 +23,6 @@ private:
SerializeElement<uint32_t> startAddress;
SerializeElement<uint32_t> endAddress;
};
#endif /* BSP_Q7S_DEVICES_DEVICEDEFINITIONS_PLOCMEMDUMPDEFINITIONS_H_ */

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +0,0 @@
target_sources(${TARGET_NAME} PRIVATE
gpioCallbacks.cpp
)

View File

@ -1,340 +0,0 @@
#include "gpioCallbacks.h"
#include "busConf.h"
#include <devices/gpioIds.h>
#include <fsfw_hal/linux/gpio/LinuxLibgpioIF.h>
#include <fsfw_hal/common/gpio/GpioCookie.h>
#include <fsfw/serviceinterface/ServiceInterface.h>
namespace gpioCallbacks {
GpioIF* gpioComInterface;
void initSpiCsDecoder(GpioIF* gpioComIF) {
ReturnValue_t result;
if (gpioComIF == nullptr) {
sif::debug << "initSpiCsDecoder: Invalid gpioComIF" << std::endl;
return;
}
gpioComInterface = gpioComIF;
GpioCookie* spiMuxGpios = new GpioCookie;
GpiodRegularByLabel* spiMuxBit = nullptr;
/** Setting mux bit 1 to low will disable IC21 on the interface board */
spiMuxBit = new GpiodRegularByLabel(q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_1,
"SPI Mux Bit 1", gpio::OUT, gpio::LOW);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_1, spiMuxBit);
/** Setting mux bit 2 to low disables IC1 on the TCS board */
spiMuxBit = new GpiodRegularByLabel(q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_2,
"SPI Mux Bit 2", gpio::OUT, gpio::LOW);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_2, spiMuxBit);
/** Setting mux bit 3 to low disables IC2 on the TCS board and IC22 on the interface board */
spiMuxBit = new GpiodRegularByLabel(q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_3,
"SPI Mux Bit 3", gpio::OUT, gpio::LOW);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_3, spiMuxBit);
/** The following gpios can take arbitrary initial values */
spiMuxBit = new GpiodRegularByLabel(q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_4,
"SPI Mux Bit 4", gpio::OUT, gpio::LOW);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_4, spiMuxBit);
spiMuxBit = new GpiodRegularByLabel(q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_5,
"SPI Mux Bit 5", gpio::OUT, gpio::LOW);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_5, spiMuxBit);
spiMuxBit = new GpiodRegularByLabel(q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_6,
"SPI Mux Bit 6", gpio::OUT, gpio::LOW);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_6, spiMuxBit);
GpiodRegularByLabel* enRwDecoder = new GpiodRegularByLabel(q7s::GPIO_FLEX_OBC1F_B1,
q7s::EN_RW_CS, "EN_RW_CS", gpio::OUT, gpio::HIGH);
spiMuxGpios->addGpio(gpioIds::EN_RW_CS, enRwDecoder);
result = gpioComInterface->addGpios(spiMuxGpios);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "initSpiCsDecoder: Failed to add mux bit gpios to gpioComIF" << std::endl;
return;
}
}
void spiCsDecoderCallback(gpioId_t gpioId, gpio::GpioOperation gpioOp, int value,
void* args) {
if (gpioComInterface == nullptr) {
sif::debug << "spiCsDecoderCallback: No gpioComIF specified. Call initSpiCsDecoder "
<< "to specify gpioComIF" << std::endl;
return;
}
/* Reading is not supported by the callback function */
if (gpioOp == gpio::GpioOperation::READ) {
return;
}
if (value == 1) {
disableAllDecoder();
}
else if (value == 0) {
switch (gpioId) {
case(gpioIds::RTD_IC3): {
enableDecoderTcsIc1();
selectY7();
break;
}
case(gpioIds::RTD_IC4): {
enableDecoderTcsIc1();
selectY6();
break;
}
case(gpioIds::RTD_IC5): {
enableDecoderTcsIc1();
selectY5();
break;
}
case(gpioIds::RTD_IC6): {
enableDecoderTcsIc1();
selectY4();
break;
}
case(gpioIds::RTD_IC7): {
enableDecoderTcsIc1();
selectY3();
break;
}
case(gpioIds::RTD_IC8): {
enableDecoderTcsIc1();
selectY2();
break;
}
case(gpioIds::RTD_IC9): {
enableDecoderTcsIc1();
selectY1();
break;
}
case(gpioIds::RTD_IC10): {
enableDecoderTcsIc1();
selectY0();
break;
}
case(gpioIds::RTD_IC11): {
enableDecoderTcsIc2();
selectY7();
break;
}
case(gpioIds::RTD_IC12): {
enableDecoderTcsIc2();
selectY6();
break;
}
case(gpioIds::RTD_IC13): {
enableDecoderTcsIc2();
selectY5();
break;
}
case(gpioIds::RTD_IC14): {
enableDecoderTcsIc2();
selectY4();
break;
}
case(gpioIds::RTD_IC15): {
enableDecoderTcsIc2();
selectY3();
break;
}
case(gpioIds::RTD_IC16): {
enableDecoderTcsIc2();
selectY2();
break;
}
case(gpioIds::RTD_IC17): {
enableDecoderTcsIc2();
selectY1();
break;
}
case(gpioIds::RTD_IC18): {
enableDecoderTcsIc2();
selectY0();
break;
}
case(gpioIds::CS_SUS_1): {
enableDecoderInterfaceBoardIc1();
selectY0();
break;
}
case(gpioIds::CS_SUS_2): {
enableDecoderInterfaceBoardIc1();
selectY1();
break;
}
case(gpioIds::CS_SUS_3): {
enableDecoderInterfaceBoardIc2();
selectY0();
break;
}
case(gpioIds::CS_SUS_4): {
enableDecoderInterfaceBoardIc2();
selectY1();
break;
}
case(gpioIds::CS_SUS_5): {
enableDecoderInterfaceBoardIc2();
selectY2();
break;
}
case(gpioIds::CS_SUS_6): {
enableDecoderInterfaceBoardIc1();
selectY2();
break;
}
case(gpioIds::CS_SUS_7): {
enableDecoderInterfaceBoardIc1();
selectY3();
break;
}
case(gpioIds::CS_SUS_8): {
enableDecoderInterfaceBoardIc2();
selectY3();
break;
}
case(gpioIds::CS_SUS_9): {
enableDecoderInterfaceBoardIc1();
selectY4();
break;
}
case(gpioIds::CS_SUS_10): {
enableDecoderInterfaceBoardIc1();
selectY5();
break;
}
case(gpioIds::CS_SUS_11): {
enableDecoderInterfaceBoardIc2();
selectY4();
break;
}
case(gpioIds::CS_SUS_12): {
enableDecoderInterfaceBoardIc2();
selectY5();
break;
}
case(gpioIds::CS_SUS_13): {
enableDecoderInterfaceBoardIc1();
selectY6();
break;
}
case(gpioIds::CS_RW1): {
enableRwDecoder();
selectY0();
break;
}
case(gpioIds::CS_RW2): {
enableRwDecoder();
selectY1();
break;
}
case(gpioIds::CS_RW3): {
enableRwDecoder();
selectY2();
break;
}
case(gpioIds::CS_RW4): {
enableRwDecoder();
selectY3();
break;
}
default:
sif::debug << "spiCsDecoderCallback: Invalid gpio id " << gpioId << std::endl;
}
}
else {
sif::debug << "spiCsDecoderCallback: Invalid value. Must be 0 or 1" << std::endl;
}
}
void enableDecoderTcsIc1() {
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_1);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_2);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_3);
}
void enableDecoderTcsIc2() {
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_1);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_2);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_3);
}
void enableDecoderInterfaceBoardIc1() {
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_1);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_2);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_3);
}
void enableDecoderInterfaceBoardIc2() {
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_1);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_2);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_3);
}
void enableRwDecoder() {
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_1);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_2);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_3);
gpioComInterface->pullHigh(gpioIds::EN_RW_CS);
}
void selectY0() {
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_4);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_5);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_6);
}
void selectY1() {
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_4);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_5);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_6);
}
void selectY2() {
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_4);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_5);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_6);
}
void selectY3() {
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_4);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_5);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_6);
}
void selectY4() {
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_4);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_5);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_6);
}
void selectY5() {
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_4);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_5);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_6);
}
void selectY6() {
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_4);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_5);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_6);
}
void selectY7() {
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_4);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_5);
gpioComInterface->pullHigh(gpioIds::SPI_MUX_BIT_6);
}
void disableAllDecoder() {
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_1);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_2);
gpioComInterface->pullLow(gpioIds::SPI_MUX_BIT_3);
gpioComInterface->pullLow(gpioIds::EN_RW_CS);
}
}

View File

@ -1,67 +0,0 @@
#ifndef LINUX_GPIO_GPIOCALLBACKS_H_
#define LINUX_GPIO_GPIOCALLBACKS_H_
#include <fsfw_hal/common/gpio/gpioDefinitions.h>
#include <fsfw_hal/common/gpio/GpioIF.h>
namespace gpioCallbacks {
/**
* @brief This function initializes the GPIOs used to control the SN74LVC138APWR decoders on
* the TCS Board and the interface board.
*/
void initSpiCsDecoder(GpioIF* gpioComIF);
/**
* @brief This function implements the decoding to multiply gpios by using the decoder
* chips SN74LVC138APWR on the TCS board and the interface board.
*/
void spiCsDecoderCallback(gpioId_t gpioId, gpio::GpioOperation gpioOp, int value, void* args);
/**
* @brief This function sets mux bits 1-3 to a state which will only enable the decoder
* on the TCS board which is named to IC1 in the schematic.
*/
void enableDecoderTcsIc1();
/**
* @brief This function sets mux bits 1-3 to a state which will only enable the decoder
* on the TCS board which is named to IC2 in the schematic.
*/
void enableDecoderTcsIc2();
/**
* @brief This function sets mux bits 1-3 to a state which will only enable the decoder
* on the inteface board board which is named to IC21 in the schematic.
*/
void enableDecoderInterfaceBoardIc1();
/**
* @brief This function sets mux bits 1-3 to a state which will only enable the decoder
* on the inteface board board which is named to IC22 in the schematic.
*/
void enableDecoderInterfaceBoardIc2();
/**
* @brief Enables the reaction wheel chip select decoder (IC3).
*/
void enableRwDecoder();
/**
* @brief This function disables all decoder.
*/
void disableAllDecoder();
/** The following functions enable the appropriate channel of the currently enabled decoder */
void selectY0();
void selectY1();
void selectY2();
void selectY3();
void selectY4();
void selectY5();
void selectY6();
void selectY7();
}
#endif /* LINUX_GPIO_GPIOCALLBACKS_H_ */

View File

@ -12,8 +12,7 @@
* @brief This is the main program for the target hardware.
* @return
*/
int main(void)
{
int main(void) {
using namespace std;
#if Q7S_SIMPLE_MODE == 0
return obsw::obsw();

View File

@ -1,4 +1,4 @@
target_sources(${TARGET_NAME} PRIVATE
target_sources(${OBSW_NAME} PRIVATE
FileSystemHandler.cpp
SdCardManager.cpp
scratchApi.cpp

View File

@ -1,33 +1,31 @@
#include "FileSystemHandler.h"
#include "bsp_q7s/core/CoreController.h"
#include "fsfw/tasks/TaskFactory.h"
#include "fsfw/memory/GenericFileSystemMessage.h"
#include "fsfw/ipc/QueueFactory.h"
#include <cstring>
#include <fstream>
#include <filesystem>
#include <fstream>
FileSystemHandler::FileSystemHandler(object_id_t fileSystemHandler):
SystemObject(fileSystemHandler) {
mq = QueueFactory::instance()->createMessageQueue(FS_MAX_QUEUE_SIZE);
#include "bsp_q7s/core/CoreController.h"
#include "fsfw/ipc/QueueFactory.h"
#include "fsfw/memory/GenericFileSystemMessage.h"
#include "fsfw/tasks/TaskFactory.h"
FileSystemHandler::FileSystemHandler(object_id_t fileSystemHandler)
: SystemObject(fileSystemHandler) {
auto mqArgs = MqArgs(this->getObjectId());
mq = QueueFactory::instance()->createMessageQueue(FS_MAX_QUEUE_SIZE,
MessageQueueMessage::MAX_MESSAGE_SIZE, &mqArgs);
}
FileSystemHandler::~FileSystemHandler() {
QueueFactory::instance()->deleteMessageQueue(mq);
}
FileSystemHandler::~FileSystemHandler() { QueueFactory::instance()->deleteMessageQueue(mq); }
ReturnValue_t FileSystemHandler::performOperation(uint8_t unsignedChar) {
while (true) {
try {
fileSystemHandlerLoop();
}
catch(std::bad_alloc& e) {
} catch (std::bad_alloc& e) {
// Restart OBSW, hints at a memory leak
sif::error << "Allocation error in FileSystemHandler::performOperation"
<< e.what() << std::endl;
sif::error << "Allocation error in FileSystemHandler::performOperation" << e.what()
<< std::endl;
// Set up an error file or a special flag in the scratch buffer for these cases
triggerEvent(CoreController::ALLOC_FAILURE, 0, 0);
CoreController::incrementAllocationFailureCount();
@ -35,7 +33,6 @@ ReturnValue_t FileSystemHandler::performOperation(uint8_t unsignedChar) {
}
}
void FileSystemHandler::fileSystemHandlerLoop() {
CommandMessage filemsg;
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
@ -48,10 +45,8 @@ void FileSystemHandler::fileSystemHandlerLoop() {
result = mq->receiveMessage(&filemsg);
if (result == MessageQueueIF::EMPTY) {
break;
}
else if(result != HasReturnvaluesIF::RETURN_FAILED) {
sif::warning << "FileSystemHandler::performOperation: Message reception failed!"
<< std::endl;
} else if (result != HasReturnvaluesIF::RETURN_FAILED) {
sif::warning << "FileSystemHandler::performOperation: Message reception failed!" << std::endl;
break;
}
Command_t command = filemsg.getCommand();
@ -78,26 +73,23 @@ void FileSystemHandler::fileSystemCheckup() {
sdcMan->getSdCardActiveStatus(statusPair);
sd::SdCard preferredSdCard;
sdcMan->getPreferredSdCard(preferredSdCard);
if((preferredSdCard == sd::SdCard::SLOT_0) and
(statusPair.first == sd::SdState::MOUNTED)) {
if ((preferredSdCard == sd::SdCard::SLOT_0) and (statusPair.first == sd::SdState::MOUNTED)) {
currentMountPrefix = SdCardManager::SD_0_MOUNT_POINT;
}
else if((preferredSdCard == sd::SdCard::SLOT_1) and
} else if ((preferredSdCard == sd::SdCard::SLOT_1) and
(statusPair.second == sd::SdState::MOUNTED)) {
currentMountPrefix = SdCardManager::SD_1_MOUNT_POINT;
}
else {
} else {
std::string sdString;
if (preferredSdCard == sd::SdCard::SLOT_0) {
sdString = "0";
}
else {
} else {
sdString = "1";
}
sif::warning << "FileSystemHandler::performOperation: "
"Inconsistent state detected" << std::endl;
sif::warning << "Preferred SD card is " << sdString <<
" but does not appear to be mounted. Attempting fix.." << std::endl;
"Inconsistent state detected"
<< std::endl;
sif::warning << "Preferred SD card is " << sdString
<< " but does not appear to be mounted. Attempting fix.." << std::endl;
// This function will appear to fix the inconsistent state
ReturnValue_t result = sdcMan->sanitizeState(&statusPair, preferredSdCard);
if (result != HasReturnvaluesIF::RETURN_OK) {
@ -108,15 +100,13 @@ void FileSystemHandler::fileSystemCheckup() {
}
}
MessageQueueId_t FileSystemHandler::getCommandQueue() const {
return mq->getId();
}
MessageQueueId_t FileSystemHandler::getCommandQueue() const { return mq->getId(); }
ReturnValue_t FileSystemHandler::initialize() {
coreCtrl = ObjectManager::instance()->get<CoreController>(objects::CORE_CONTROLLER);
if (coreCtrl == nullptr) {
sif::error << "FileSystemHandler::initialize: Could not retrieve core controller handle" <<
std::endl;
sif::error << "FileSystemHandler::initialize: Could not retrieve core controller handle"
<< std::endl;
}
sdcMan = SdCardManager::instance();
sd::SdCard preferredSdCard;
@ -126,22 +116,20 @@ ReturnValue_t FileSystemHandler::initialize() {
}
if (preferredSdCard == sd::SdCard::SLOT_0) {
currentMountPrefix = SdCardManager::SD_0_MOUNT_POINT;
}
else if(preferredSdCard == sd::SdCard::SLOT_1) {
} else if (preferredSdCard == sd::SdCard::SLOT_1) {
currentMountPrefix = SdCardManager::SD_1_MOUNT_POINT;
}
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t FileSystemHandler::appendToFile(const char* repositoryPath, const char* filename,
const uint8_t *data, size_t size, uint16_t packetNumber, void *args) {
// A double slash between repo and filename should not be an issue, so add it in any case
std::string fullPath = currentMountPrefix + std::string(repositoryPath) + "/" +
std::string(filename);
if(not std::filesystem::exists(fullPath)) {
const uint8_t* data, size_t size,
uint16_t packetNumber, FileSystemArgsIF* args) {
auto path = getInitPath(args) / repositoryPath / filename;
if (not std::filesystem::exists(path)) {
return FILE_DOES_NOT_EXIST;
}
std::ofstream file(fullPath, std::ios_base::app|std::ios_base::out);
std::ofstream file(path, std::ios_base::app | std::ios_base::out);
file.write(reinterpret_cast<const char*>(data), size);
if (not file.good()) {
return GENERIC_FILE_ERROR;
@ -150,20 +138,13 @@ ReturnValue_t FileSystemHandler::appendToFile(const char *repositoryPath, const
}
ReturnValue_t FileSystemHandler::createFile(const char* repositoryPath, const char* filename,
const uint8_t *data, size_t size, void *args) {
std::string fullPath;
bool useMountPrefix = true;
parseCfg(reinterpret_cast<FsCommandCfg*>(args), useMountPrefix);
if(useMountPrefix) {
fullPath += currentMountPrefix;
}
// A double slash between repo and filename should not be an issue, so add it in any case
fullPath += std::string(repositoryPath) + "/" + std::string(filename);
if(std::filesystem::exists(fullPath)) {
const uint8_t* data, size_t size,
FileSystemArgsIF* args) {
auto path = getInitPath(args) / filename;
if (std::filesystem::exists(path)) {
return FILE_ALREADY_EXISTS;
}
std::ofstream file(fullPath);
std::ofstream file(path);
file.write(reinterpret_cast<const char*>(data), size);
if (not file.good()) {
return GENERIC_FILE_ERROR;
@ -172,20 +153,12 @@ ReturnValue_t FileSystemHandler::createFile(const char *repositoryPath, const ch
}
ReturnValue_t FileSystemHandler::removeFile(const char* repositoryPath, const char* filename,
void *args) {
std::string fullPath;
bool useMountPrefix = true;
parseCfg(reinterpret_cast<FsCommandCfg*>(args), useMountPrefix);
if(useMountPrefix) {
fullPath += currentMountPrefix;
}
// A double slash between repo and filename should not be an issue, so add it in any case
fullPath += std::string(repositoryPath) + "/" + std::string(filename);
if(not std::filesystem::exists(fullPath)) {
FileSystemArgsIF* args) {
auto path = getInitPath(args) / repositoryPath / filename;
if (not std::filesystem::exists(path)) {
return FILE_DOES_NOT_EXIST;
}
int result = std::remove(fullPath.c_str());
int result = std::remove(path.c_str());
if (result != 0) {
sif::warning << "FileSystemHandler::deleteFile: Failed with code " << result << std::endl;
return GENERIC_FILE_ERROR;
@ -193,68 +166,51 @@ ReturnValue_t FileSystemHandler::removeFile(const char *repositoryPath, const ch
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t FileSystemHandler::createDirectory(const char *repositoryPath, void *args) {
std::string fullPath;
bool useMountPrefix = true;
parseCfg(reinterpret_cast<FsCommandCfg*>(args), useMountPrefix);
if(useMountPrefix) {
fullPath += currentMountPrefix;
}
fullPath += std::string(repositoryPath);
if(std::filesystem::exists(fullPath)) {
ReturnValue_t FileSystemHandler::createDirectory(const char* repositoryPath, const char* dirname,
bool createParentDirs, FileSystemArgsIF* args) {
auto path = getInitPath(args) / repositoryPath / dirname;
if (std::filesystem::exists(path)) {
return DIRECTORY_ALREADY_EXISTS;
}
if(std::filesystem::create_directory(fullPath)) {
if (std::filesystem::create_directory(path)) {
return HasReturnvaluesIF::RETURN_OK;
}
sif::warning << "Creating directory " << fullPath << " failed" << std::endl;
sif::warning << "Creating directory " << path << " failed" << std::endl;
return GENERIC_FILE_ERROR;
}
ReturnValue_t FileSystemHandler::removeDirectory(const char *repositoryPath,
bool deleteRecurively, void *args) {
std::string fullPath;
bool useMountPrefix = true;
parseCfg(reinterpret_cast<FsCommandCfg*>(args), useMountPrefix);
if(useMountPrefix) {
fullPath += currentMountPrefix;
}
fullPath += std::string(repositoryPath);
if(not std::filesystem::exists(fullPath)) {
ReturnValue_t FileSystemHandler::removeDirectory(const char* repositoryPath, const char* dirname,
bool deleteRecurively, FileSystemArgsIF* args) {
auto path = getInitPath(args) / repositoryPath / dirname;
if (not std::filesystem::exists(path)) {
return DIRECTORY_DOES_NOT_EXIST;
}
std::error_code err;
if (not deleteRecurively) {
if(std::filesystem::remove(fullPath, err)) {
if (std::filesystem::remove(path, err)) {
return HasReturnvaluesIF::RETURN_OK;
}
else {
} else {
// Check error code. Most probably denied permissions because folder is not empty
sif::warning << "FileSystemHandler::removeDirectory: Deleting directory failed with "
"code " << err.value() << ": " << strerror(err.value()) << std::endl;
"code "
<< err.value() << ": " << strerror(err.value()) << std::endl;
if (err.value() == ENOTEMPTY) {
return DIRECTORY_NOT_EMPTY;
}
else {
} else {
return GENERIC_FILE_ERROR;
}
}
}
else {
if(std::filesystem::remove_all(fullPath, err)) {
} else {
if (std::filesystem::remove_all(path, err)) {
return HasReturnvaluesIF::RETURN_OK;
}
else {
} else {
sif::warning << "FileSystemHandler::removeDirectory: Deleting directory failed with "
"code " << err.value() << ": " << strerror(err.value()) << std::endl;
"code "
<< err.value() << ": " << strerror(err.value()) << std::endl;
// Check error code
if (err.value() == ENOTEMPTY) {
return DIRECTORY_NOT_EMPTY;
}
else {
} else {
return GENERIC_FILE_ERROR;
}
}
@ -263,8 +219,25 @@ ReturnValue_t FileSystemHandler::removeDirectory(const char *repositoryPath,
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t FileSystemHandler::renameFile(const char* repositoryPath, const char* oldFilename,
const char* newFilename, FileSystemArgsIF* args) {
auto basepath = getInitPath(args) / repositoryPath;
std::filesystem::rename(basepath / oldFilename, basepath / newFilename);
return HasReturnvaluesIF::RETURN_OK;
}
void FileSystemHandler::parseCfg(FsCommandCfg* cfg, bool& useMountPrefix) {
if (cfg != nullptr) {
useMountPrefix = cfg->useMountPrefix;
}
}
std::filesystem::path FileSystemHandler::getInitPath(FileSystemArgsIF* args) {
bool useMountPrefix = true;
parseCfg(reinterpret_cast<FsCommandCfg*>(args), useMountPrefix);
std::string path;
if (useMountPrefix) {
path = currentMountPrefix;
}
return std::filesystem::path(path);
}

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