Compare commits

...

829 Commits

Author SHA1 Message Date
f9c8b544ba Merge pull request 'v1.9.1' (#178) from develop into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #178
2022-03-09 09:34:13 +01:00
3dd6fcc75a Merge pull request 'Hotfixes, bump to v1.9.1' (#176) from mueller/hotfixes into develop
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build queued...
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #176
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-03-08 17:47:34 +01:00
15151e0400 bump revision
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-03-08 11:59:06 +01:00
b992058e00 hotfix for countdown in SDC manager
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
2022-03-08 11:58:13 +01:00
48f972f7a2 Merge pull request 'v1.9.0' (#175) from develop into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #175
2022-03-08 10:32:40 +01:00
b6c34d11d2 Merge branch 'develop' of https://egit.irs.uni-stuttgart.de/eive/eive-obsw into develop
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-03-08 10:26:00 +01:00
a73710088d bump minor version 2022-03-08 10:25:47 +01:00
3dad3f311b Merge branch 'main' into develop
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2022-03-08 10:25:01 +01:00
6b2d6609a3 fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
2022-03-08 10:24:36 +01:00
7b4f45b082 Merge pull request 'enabled more GCC warnings' (#174) from mueller/additional-gcc-warnings into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-main This commit looks good
Reviewed-on: #174
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-03-08 10:12:47 +01:00
d799e3768d repoint tmtc
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head Build started...
2022-03-08 09:50:47 +01:00
10a2973dc7 minor update in fsfw
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-03-08 09:48:18 +01:00
6ccf16f56d enabled more GCC warnings
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-03-08 09:37:23 +01:00
a145a868dc Merge pull request 'move archive folder' (#170) from mueller/move-archive-folder into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #170
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-03-08 07:51:26 +01:00
7134401570 Merge branch 'develop' into mueller/move-archive-folder
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-03-07 15:39:12 +01:00
21d7d5b6f9 Merge pull request 'keeping unittests running' (#173) from mohr/unittests into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #173
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2022-03-07 15:38:58 +01:00
afb1c875da fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-03-07 15:34:19 +01:00
2ef1befb9c common gpioIds.h file
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-03-07 15:29:27 +01:00
4e8ce4eb0a keeping unittests running
Some checks failed
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-03-07 11:47:44 +01:00
e1e6657b48 Merge pull request 'update for generator scripts' (#171) from mueller/gen-update-formatter into develop
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Reviewed-on: #171
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-03-04 16:19:33 +01:00
909a0e1c16 Merge pull request 'Payload PCDU' (#172) from mueller/plpcdu into develop
Reviewed-on: #172
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-03-04 16:18:54 +01:00
926888308d Merge branch 'develop' into mueller/plpcdu
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-04 15:31:21 +01:00
e7c0066d5d added last small fixes for successfull compilation
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-develop Build queued...
2022-03-04 15:28:47 +01:00
7f42de1c82 added PL PCDU code 2022-03-04 15:26:36 +01:00
8054694763 update for generator scripts
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
- Generators will now copy csv files into tmtc folder
- Bump fsfwgen dependency, some bugfixes
- Rerun formatter
- Rerun generator scripts
2022-03-04 15:14:02 +01:00
f419ac8fd7 Merge branch 'develop' into mueller/move-archive-folder
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-03-04 15:05:27 +01:00
392faa6664 Merge pull request 'building with -j4 instead of -j to limit load on buildserver' (#167) from mohr/slowbuild into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #167
2022-03-04 15:05:07 +01:00
b71ea7c4c7 move archive folder
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-03-04 15:00:14 +01:00
f39a755815 Merge branch 'develop' into mohr/slowbuild
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build queued...
2022-03-04 14:53:18 +01:00
535a2eea84 Merge pull request 'doge' (#169) from mueller/doge into develop
Some checks reported errors
EIVE/eive-obsw/pipeline/head Something is wrong with the build of this commit
Reviewed-on: #169
2022-03-04 14:53:05 +01:00
e2d6202d56 Merge branch 'develop' into mueller/doge
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build queued...
2022-03-04 14:50:48 +01:00
7b9023cb6f Merge pull request 'Update for generator scripts' (#163) from mueller/generators-update into develop
Some checks reported errors
EIVE/eive-obsw/pipeline/head Something is wrong with the build of this commit
Reviewed-on: #163
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-03-04 09:56:08 +01:00
6c51553f71 Merge pull request 'ADIS Gyro Handler: Use OSAL define instead of dedicated define' (#162) from mueller/adis-optimization into develop
Reviewed-on: #162
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-03-04 09:55:43 +01:00
b6de685ea2 Merge pull request 'Update for memory management' (#159) from mueller/sdcman-mg into develop
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Reviewed-on: #159
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-03-04 09:55:06 +01:00
f6a69e2eca Merge pull request 'added try catch for more safety' (#168) from mueller/catch-nlohmann-json into develop
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Reviewed-on: #168
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2022-03-04 09:54:17 +01:00
74c1bba814 doge
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-03-03 19:21:56 +01:00
ebdd3914f4 added try catch for more safety
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-03-03 19:13:43 +01:00
bb20b470ec building with -j4 instead of -j to limit strain on buildserver
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2022-03-03 15:59:44 +01:00
714167f112 Merge remote-tracking branch 'origin/develop' into mueller/sdcman-mg
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head Build queued...
2022-03-03 13:38:39 +01:00
5ce46beebf Merge remote-tracking branch 'origin/develop' into mueller/adis-optimization
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2022-03-03 13:38:21 +01:00
0f60d82c06 Merge remote-tracking branch 'origin/develop' into mueller/generators-update
Some checks reported errors
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head Something is wrong with the build of this commit
2022-03-03 13:37:51 +01:00
e07713a6f7 Merge pull request 'Adding Catch2 for unittests, reworked CI' (#165) from mohr/catch2 into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #165
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2022-03-03 13:34:24 +01:00
fd368343c4 submodule updates
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-03-03 10:36:53 +01:00
97a0662adc submodule updates
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-03-03 10:36:33 +01:00
3f7fb259c9 submodule updates
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build queued...
2022-03-03 10:36:10 +01:00
458b33e5fd submodule updates
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2022-03-03 10:34:49 +01:00
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
33483b81a6 update generator scripts
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-01 18:05:11 +01:00
2a730df2a8 update generator scripts 2022-03-01 18:03:50 +01:00
193e2bb0f9 Merge branch 'develop' into mueller/adis-optimization
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-03-01 17:58:53 +01:00
3b1f088596 use OSAL define instead of dedicated define
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
2022-03-01 17:57:48 +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
c23c36535c Merge remote-tracking branch 'origin/develop' into mueller/sdcman-mg
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-03-01 17:51:05 +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
db75f6d3bf repoint fsfw
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2022-03-01 17:45:41 +01:00
711732ccd6 Udated for memory management
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-01 17:41:58 +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
0a11ca6051 Merge pull request 'Update to v1.8.0' (#100) from develop into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #100
2021-09-24 10:17:43 +02:00
b305924e11 Merge branch 'main' into develop
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-24 10:13:18 +02:00
11537f9988 mgm 2 lis3 chip select opened by name 2021-09-24 09:42:20 +02:00
863295cd31 Merge pull request 'RW ReplyHandler fix' (#99) from mueller/rw-replyhandler-fix into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-main This commit looks good
Reviewed-on: #99
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-09-23 20:14:27 +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
b1a91da844 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-09-23 17:15:51 +02:00
d6164971df Merge branch 'develop' into meier/openGpioByName 2021-09-23 17:14:12 +02:00
397e1433fd GPS and RW handler improvements
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-23 17:14:08 +02:00
0e68dbd86c open mgm 2 lis3 chip select by name 2021-09-23 17:13:17 +02:00
31c84d47fe Merge pull request 'ACS board now working' (#98) from mueller/acs-board-working into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #98
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-09-23 16:03:11 +02:00
8fc144b595 RW handler tweaks
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-23 16:03:09 +02:00
8693075061 fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-23 15:58:03 +02:00
b128455217 RW small improvements
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-23 15:35:33 +02:00
99c975d0cd Merge branch 'mueller/acs-board-working' into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-23 15:28:44 +02:00
d5205b59c1 fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-23 15:24:47 +02:00
26fbd81d39 Merge branch 'develop' into mueller/acs-board-working
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head Build queued...
2021-09-23 15:23:46 +02:00
0ccf062d51 transition delays
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-09-23 15:20:55 +02:00
aa71159a9a A side enabled by default
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-09-23 14:45:42 +02:00
e56a30df06 HW bug fixes, board should work cleanly now
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-23 13:13:46 +02:00
c035a26051 gpio open by line name test on te0720 2021-09-23 10:51:47 +02:00
7b7bd76703 fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-22 18:38:06 +02:00
d54e2276d6 ccsds handler wip 2021-09-22 16:54:55 +02:00
ee878d9fe9 bugfix EIVE PST
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-22 16:14:33 +02:00
0b50d9aedf fix for ADIS device
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-22 16:00:31 +02:00
4131084973 several tweaks and fixes
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-22 15:43:11 +02:00
b81ff7f8f5 Merge pull request 'GPIO Refactoring' (#97) from mueller/gpio-refactoring into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #97
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-09-22 14:40:27 +02:00
1284d10257 RPI updates
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-22 14:27:01 +02:00
af9a9b837a added missing GPIO
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-22 14:10:21 +02:00
9a16544836 cleaning up RPi code
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-22 14:04:39 +02:00
dbcf4f5d69 more improvements for RPi code
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-22 12:29:43 +02:00
f9050ab185 fixes for RPi code
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-22 12:19:45 +02:00
d6e22e7d4d trying other timing
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-22 11:48:56 +02:00
e1ae1c021a made more spi devices optional
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-22 11:45:25 +02:00
da45326150 bumped SW subversion
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-22 09:22:06 +02:00
28040f85cc fixes for new gpio update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-21 19:28:22 +02:00
652cfa0986 gpio refactoring
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-21 17:31:55 +02:00
3a76ee366d 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-21 16:03:39 +02:00
09c602a830 Merge pull request 'meier/gpioNaming' (#96) from meier/gpioNaming into develop
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Reviewed-on: #96
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2021-09-21 16:02:22 +02:00
1d8c4be47a fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-21 14:47:03 +02:00
e2c26efe4a Merge branch 'meier/gpioNaming' into meier/ptme 2021-09-20 19:11:22 +02:00
c4ba578285 fixed warning
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head Build queued...
2021-09-20 18:46:48 +02:00
804afa5d96 add test code now default 0 2021-09-20 18:15:35 +02:00
26162f8e78 gpio chips now opened by label 2021-09-20 17:47:29 +02:00
38903f647b Merge branch 'develop' into meier/gpioNaming 2021-09-20 16:31:15 +02:00
cd92f4a611 open gpio by label test on te0720 2021-09-20 16:30:50 +02:00
8f1d521007 Merge pull request 'Update Package' (#95) from mueller/update-voltage-switch-cmds into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #95
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-09-20 15:59:18 +02:00
cf9ff87560 bugfixes for new print commands
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-20 14:34:39 +02:00
cbb7fdfa99 p60 print command
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-09-20 11:47:19 +02:00
487b6fd5ca updated print commands for PDUs
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-20 11:22:11 +02:00
ddd8ff2180 ptme handling wip 2021-09-19 12:27:48 +02:00
87d00dbcee some more acs board tests
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-17 16:53:15 +02:00
5cb6ab8416 more acs tests
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-17 13:08:03 +02:00
4b5f22f013 Merge pull request 'Update Package' (#94) from mueller/update-package into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #94
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-09-17 08:01:17 +02:00
48a8a52b1c moved lis3mdl to fsfw
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-16 18:51:06 +02:00
8dcd2f0c95 some cfg improvements
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-16 17:33:47 +02:00
2cb562cdee tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-16 17:25:16 +02:00
00bafd98fe obsw config, gps update 2021-09-16 17:24:34 +02:00
536c0cb0fe new commands now working
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-16 15:00:31 +02:00
0f57fc33c8 tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-16 14:51:51 +02:00
2aa76766af added print commands for PCDU 2021-09-16 14:51:14 +02:00
00711c148a rm3100 changes
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-16 13:40:29 +02:00
d0cba24a37 Merge branch 'mueller/update-package' into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-16 11:52:34 +02:00
adb0147ea9 tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-16 11:52:03 +02:00
086d076262 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
2021-09-16 11:46:55 +02:00
260082c425 fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-16 11:46:34 +02:00
ad052462c1 fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-09-16 11:36:40 +02:00
b8b6cd8872 moved RM3100 handler to framework
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-09-16 11:34:07 +02:00
799e90f617 reverted some change
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-09-16 11:15:14 +02:00
8afc6dea11 Merge remote-tracking branch 'origin/develop' into mueller/update-package
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-09-16 11:13:34 +02:00
8af3a91b5a correct RW pin
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop Build queued...
2021-09-16 11:11:25 +02:00
bdd5a7dd21 more storage for events
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-15 18:50:23 +02:00
2630d7fae7 tweak for rm3100
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-15 17:49:15 +02:00
df5b0a19de improved preprocessor defines
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-15 17:38:26 +02:00
c7d0a9551e small bugfix for rm3100
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-15 17:26:23 +02:00
26fa568d72 Merge pull request 'GNSS ACS board update' (#92) from mueller/gnss-acs-update into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #92
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-09-15 15:43:01 +02:00
39acc24535 testing ADIS handler
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-15 13:41:13 +02:00
d29b86a0bd Merge remote-tracking branch 'origin/develop' into mueller/master 2021-09-15 13:40:54 +02:00
8e6a2a1f02 Merge pull request 'LIS3MDL scaling bugfix' (#93) from lis3mdl-scaling-bugfix into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #93
Looks good.
2021-09-15 10:35:19 +02:00
43fe7e0aa0 using enum for sensitivity now
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-14 13:55:56 +02:00
ca79f370b0 Fixed bugs in mag. field scaling math.
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-09-14 12:30:46 +02:00
10f5933c1e enable pins
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-13 18:10:24 +02:00
3354f2a696 acd board tests continued
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-13 18:07:07 +02:00
c67a7ef1d8 added more package pin comments
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-13 11:48:11 +02:00
63ec5d6338 fsfw update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-09-13 10:26:20 +02:00
a66a76609f Merge branch 'mueller/master' of https://egit.irs.uni-stuttgart.de/eive/eive-obsw into mueller/master 2021-09-13 10:26:10 +02:00
9f389fb920 added newline 2021-09-13 10:25:58 +02:00
9dff2e1479 enable periodci reply now
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-09-11 17:40:13 +02:00
299136f1a5 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/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-10 10:05:53 +02:00
2c65849bc6 tmtc update 2021-09-10 10:05:37 +02:00
0343372910 very important bugfix for reset pin gnss
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-08 19:27:49 +02:00
366c475b05 bug fixed in fsfw
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-08 17:25:13 +02:00
46e3956bca generating finish reply
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-08 17:02:37 +02:00
6409c596f7 fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-08 16:21:22 +02:00
5779f511cf some tweaks for reset pin command
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-08 16:03:20 +02:00
63c7903f9b now the print command works
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-08 13:41:27 +02:00
87495fd3af 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
2021-09-08 13:22:43 +02:00
38c60f37da tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-08 13:46:33 +02:00
baba8b5cf0 tmtc 2021-09-08 13:21:56 +02:00
a4cd99ec90 sanity check on altitude, set unix seconds
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-09-07 16:42:04 +02:00
e837532b22 form improvements
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-09-07 16:14:54 +02:00
f7c6f16777 added gps reset callback
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-09-07 16:11:02 +02:00
3b3b2ed8c3 preproc define to log NMEA data
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-07 12:00:22 +02:00
52d0182a52 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
2021-09-07 09:46:01 +02:00
405b9e7074 tmtc update 2021-09-07 09:45:51 +02:00
24c7a4e7e3 added additional comment 2021-09-07 09:45:12 +02:00
30a57ad5a4 using old transition delay
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-06 18:42:58 +02:00
d78c746552 GPS Handler bugfixes
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-06 18:27:33 +02:00
773b745c76 tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-06 14:53:04 +02:00
45409fc2d6 gps handler working properly now
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-06 12:07:15 +02:00
f97d5df75f fsfw and tmtc 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-09-06 11:35:23 +02:00
49b8232f12 tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-09-06 11:12:54 +02:00
ac3812f268 tmtc update 2021-09-06 11:12:29 +02:00
ed6ee02861 Merge remote-tracking branch 'origin/develop' into mueller/gnss-acs-update 2021-09-06 11:12:14 +02:00
94979e3561 pulling reset pin gnss high
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-02 20:27:12 +02:00
74e4415d58 updated busConf file
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-09-02 20:04:41 +02:00
08bc44ce8b Merge pull request 'v1.7.0' (#91) from develop into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #91
2021-09-02 09:29:48 +02:00
aeb289b758 Merge branch 'main' into develop
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-02 09:28:08 +02:00
56108aed66 Merge pull request 'meier/plocMemoryDumper' (#90) from meier/plocMemoryDumper into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-main This commit looks good
Reviewed-on: #90
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2021-09-02 09:16:33 +02:00
225dcf27ba Merge remote-tracking branch 'origin/develop' into meier/plocMemoryDumper
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build queued...
2021-09-02 09:15:22 +02:00
146035de5a Merge remote-tracking branch 'origin/develop' into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-02 09:14:28 +02:00
cc602ddada Merge pull request 'meier/plocSupervisor' (#89) from meier/plocSupervisor into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #89
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2021-09-02 09:13:00 +02:00
e13db2e6b6 Merge branch 'develop' into meier/plocMemoryDumper
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-08-31 11:20:43 +02:00
0f79864446 ploc memory dumper complete 2021-08-31 11:20:21 +02:00
01dd2eb92e Merge branch 'develop' into meier/plocSupervisor
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-29 07:32:19 +02:00
89b68940be ploc memory dumper wip 2021-08-29 07:31:34 +02:00
c8150dff17 Merge pull request 'added LICENSE and NOTICE file' (#88) from mueller/license-notice-file into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #88
2021-08-29 07:31:01 +02:00
d8e1e4561d troubleshooting for wayland issue
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-24 16:41:10 +02:00
c1ca43113b update README
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-24 10:40:23 +02:00
26afe1d94a fixes in C++ test code
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-23 20:43:27 +02:00
90622eb25a important fixes 2021-08-23 20:38:18 +02:00
e4e765300d more bugfixes
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-23 09:08:48 -04:00
922c33df57 using Q7S_ROOTFS now
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-23 09:03:48 -04:00
23894f9749 updated link
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-23 08:50:41 -04:00
1716034926 updated submodule link
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-23 08:49:06 -04:00
acc1849fbb fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-23 09:40:35 +02:00
d1a25bfa65 bugfixes hyperion handler 2021-08-22 20:25:05 +02:00
dc0c8c704c debugging GPS: uart is blocking!
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-20 20:18:56 +02:00
bb58281fba minor fix for gps
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-20 18:48:05 +02:00
5b9811a950 disabled all devices except for ADIS device
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-20 15:46:51 +02:00
e9849bfedd some fixes
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-20 15:25:02 +02:00
6ecd4ec2f3 pin fixes for ACS board
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-20 14:50:40 +02:00
333c46bdf8 adaptions to build ploc supervisor for trenz te0720
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-08-20 14:48:22 +02:00
23782dc2fa Device update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
1. Sun sensors added but can be disabled with preprocessor defines
2. GPS Handler
2021-08-20 14:08:11 +02:00
95b49ca49d update tmtc and arcsec submodule
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-20 13:56:43 +02:00
a45d4592c3 lwgps update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-20 12:05:15 +02:00
9a84abf77f Merge pull request 'Writeprotection handler in CoreController' (#87) from mueller/writeprotect-handler into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #87
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-08-20 11:08:25 +02:00
5789e2a3b5 added LICENSE and NOTICE file
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-20 10:43:34 +02:00
92528c7350 added LICENSE and NOTICE file
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-20 10:01:37 +02:00
3acb61959a mram dump standalone packet 2021-08-20 06:56:29 +02:00
ef75d92415 smaller tweaks
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-19 18:26:00 +02:00
e821a9700a refactoring and bugfix
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-19 18:10:19 +02:00
d1afdfe578 bugfix core controller
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-19 17:31:13 +02:00
24ecfe84ae minor fix 2021-08-19 17:27:13 +02:00
42d225bb6c fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-19 17:20:40 +02:00
7c828427e9 unix file guard diagnostic prefix adaption
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-08-19 17:08:51 +02:00
8ddd7b02dc renamed function and bugfix
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-19 14:45:25 +02:00
963e40120f added TODO
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-19 14:35:36 +02:00
faee071edc bugfixes, more tests
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-19 14:34:24 +02:00
a6777067da moved test 2021-08-19 14:16:26 +02:00
c1b22af695 several bugfixes for prot handler
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-19 14:05:25 +02:00
7fc3285272 added functions to handle writeprotection
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-19 13:34:44 +02:00
19d4349c05 submodule update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-19 10:16:55 +02:00
99a24a9a35 Merge pull request 'ACS board added' (#86) from mueller/acs-board-added into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #86
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-08-18 12:44:28 +02:00
2b061a2b1c 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
2021-08-18 11:32:49 +02:00
124abf0213 crc for ploc update 2021-08-18 08:26:31 +02:00
2f72b4e42a cleaned up
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-17 19:50:48 +02:00
e98b985d66 cleaning up preproc defines 2021-08-17 17:48:51 +02:00
9efcd90cc0 Merge pull request 'meier/pcdu' (#85) from meier/pcdu into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #85
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2021-08-17 17:14:19 +02:00
aa248b7997 new busConf file, cleaning up
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-17 17:11:59 +02:00
921e82f6d1 acs board tweaks
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-17 16:35:41 +02:00
aa43bd7d75 Merge remote-tracking branch 'origin/develop' into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-17 16:17:24 +02:00
be6056aadb adaptions to build software for Trenz TE0720
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-17 16:14:23 +02:00
a298fff602 tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-17 16:07:33 +02:00
5204afca9e pcdu debug output disabled now
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head Build queued...
2021-08-17 12:00:58 +02:00
1722f14a60 added debug output for pcdu modules
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
2021-08-17 11:59:32 +02:00
3a65f1d39f Merge pull request 'Raspberry Pi fixes, GPS Handler update, Stripped Executable' (#84) from mueller/stripped-exec into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #84
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-08-16 13:41:21 +02:00
567199f460 Merge branch 'develop' into mueller/stripped-exec
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-16 10:05:55 +02:00
cfbacd4d80 generating stripped executable now
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
2021-08-14 15:25:30 +02:00
95c06d5a09 added make size cfg
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-14 15:19:32 +02:00
dc8879b1af tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-11 19:33:26 +02:00
1962b30e5f testing HK downlink
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-11 19:27:17 +02:00
cb330bcf29 hyperion handler: HK packet subscription
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-11 18:59:40 +02:00
268cd33677 gps handler tweaks
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-11 18:52:33 +02:00
0ae55e0783 no ARCSEC lib for Raspberry Pi
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-11 18:13:43 +02:00
be43dbd293 Merge pull request 'Core Controller Bugfix' (#83) from mueller/core-controller-bugfix into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #83
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-08-11 16:48:24 +02:00
45b78a0100 Merge remote-tracking branch 'origin/develop' into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-11 16:45:17 +02:00
fc22f7d86f Merge branch 'develop' into mueller/core-controller-bugfix
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head Build queued...
2021-08-11 16:30:31 +02:00
0622b78dde Merge branch 'mueller/core-controller-bugfix' into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-11 16:30:00 +02:00
cf355a0451 missing :
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-08-11 16:29:11 +02:00
337aa39ecc Merge pull request 'meier/firmwareChanges' (#82) from meier/firmwareChanges into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #82
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2021-08-11 16:26:53 +02:00
24b58e50d1 Merge core controller bugfix
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-08-11 16:24:41 +02:00
11c2efa733 bugfix core controller
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
1. Increaed robustness of CoreController against invalid state struct
2. Bugfix: If PREFSD not set, set SD card 0 properly now
2021-08-11 16:07:00 +02:00
0efaa13a9f tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-11 15:53:27 +02:00
ae08d14626 Merge branch 'develop' into meier/firmwareChanges
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head Build queued...
2021-08-11 13:32:30 +02:00
681ad25847 Merge pull request 'v1.6.1' (#81) from develop into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #81
2021-08-11 10:47:37 +02:00
53f6a0d3a6 Merge branch 'main' into develop
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build queued...
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-11 10:47:16 +02:00
4fdcb5d7cd minor changes to match software to updated fpga design
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-11 09:41:29 +02:00
f3bc2958f9 Merge pull request 'Moved Q7S specific files' (#80) from mueller/moved-q7s-specific-files into develop
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
EIVE/eive-obsw/pipeline/pr-main Build queued...
Reviewed-on: #80
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-08-09 19:46:12 +02:00
d714f84df8 bumped revision
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-09 18:30:20 +02:00
bda8550ef9 fixes for hosted
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-08-09 18:26:34 +02:00
d604f8d3d1 one port is okay
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-09 18:23:18 +02:00
e92af98f34 moved q7s specific code to q7s folder
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-08-09 17:19:10 +02:00
3b915f4c97 Merge remote-tracking branch 'origin/develop' into mueller/master 2021-08-09 16:45:32 +02:00
03510e5de9 updated TCP port
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-08-09 16:34:06 +02:00
1d714ff85e Moved PLOC components to q7s folder
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-08-09 16:30:59 +02:00
12dbc5569e mode power down sus
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-08-09 14:44:06 +02:00
8f124de79c set all devices to mode power down in doShutDown
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-09 14:41:46 +02:00
ce1124472a Merge branch 'develop' into meier/develop 2021-08-09 14:23:27 +02:00
0580784d16 added mode power down in star tracker 2021-08-09 10:41:28 +02:00
439 changed files with 44669 additions and 27921 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

2
.gitmodules vendored
View File

@ -15,7 +15,7 @@
url = https://github.com/rmspacefish/lwgps.git
[submodule "generators/fsfwgen"]
path = generators/fsfwgen
url = https://egit.irs.uni-stuttgart.de/fsfw/fsfw-generators.git
url = https://egit.irs.uni-stuttgart.de/fsfw/fsfw-gen.git
[submodule "thirdparty/arcsec_star_tracker"]
path = thirdparty/arcsec_star_tracker
url = https://egit.irs.uni-stuttgart.de/eive/arcsec_star_tracker.git

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 MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/beagleboneblack")
option(LINUX_CROSS_COMPILE ON)
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,28 +93,34 @@ 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()
endif()
if(${TGT_BSP} MATCHES "arm/raspberrypi")
if(TGT_BSP MATCHES "arm/raspberrypi" )
# Used by configure file
set(RASPBERRY_PI ON)
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")
if(TGT_BSP MATCHES "arm/beagleboneblack")
# Used by configure file
set(BEAGLEBONEBLACK ON)
endif()
if(${TGT_BSP} MATCHES "arm/q7s")
if(TGT_BSP MATCHES "arm/q7s")
# Used by configure file
set(XIPHOS_Q7S ON)
endif()
@ -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")
configure_file(${BSP_PATH}/boardconfig/rpiConfig.h.in rpiConfig.h)
endif()
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" OR TGT_BSP MATCHES "arm/egse")
configure_file(${BSP_PATH}/boardconfig/rpiConfig.h.in rpiConfig.h)
endif()
configure_file(${WATCHDOG_PATH}/watchdogConf.h.in watchdogConf.h)
# Set common config path for FSFW
@ -135,133 +149,212 @@ set(FSFW_ADDITIONAL_INC_PATHS
"${COMMON_PATH}/config"
${CMAKE_CURRENT_BINARY_DIR}
)
# Set for lwgps library
set(LWGPS_CONFIG_PATH "${COMMON_PATH}/config")
# Check whether the user has already installed Catch2 first
find_package(Catch2 3)
################################################################################
# Executable and Sources
################################################################################
# Add executable
add_executable(${TARGET_NAME})
#global compiler options need to be set before adding executables
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options(
"-Wall"
"-Wextra"
"-Wimplicit-fallthrough=1"
"-Wno-unused-parameter"
"-Wno-psabi"
"-Wduplicated-cond" # check for duplicate conditions
"-Wduplicated-branches" # check for duplicate branches
"-Wlogical-op" # Search for bitwise operations instead of logical
"-Wnull-dereference" # Search for NULL dereference
"-Wundef" # Warn if undefind marcos are used
"-Wformat=2" # Format string problem detection
"-Wformat-overflow=2" # Formatting issues in printf
"-Wformat-truncation=2" # Formatting issues in printf
"-Wformat-security" # Search for dangerous printf operations
"-Wstrict-overflow=3" # Warn if integer overflows might happen
"-Warray-bounds=2" # Some array bounds violations will be found
"-Wshift-overflow=2" # Search for bit left shift overflows (<c++14)
"-Wcast-qual" # Warn if the constness is cast away
"-Wstringop-overflow=4"
# -Wstack-protector # Emits a few false positives for low level access
# -Wconversion # Creates many false positives
# -Warith-conversion # Use with Wconversion to find more implicit conversions
# -fanalyzer # Should be used to look through problems
)
# Remove unused sections.
add_compile_options(
"-ffunction-sections"
"-fdata-sections"
)
if(ADD_ETL_LIB)
add_subdirectory(${ETL_LIB_PATH})
# Removed unused sections.
add_link_options(
"-Wl,--gc-sections"
)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(COMPILER_FLAGS "/permissive-")
endif()
if(ADD_JSON_LIB)
# 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(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()
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()
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()
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
################################################################################
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}
# 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()
if(NOT EIVE_BUILD_WATCHDOG)
if(ADD_CSP_LIB)
target_link_libraries(${TARGET_NAME} PRIVATE
${LIB_CSP_NAME}
)
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_ETL_LIB)
target_link_libraries(${TARGET_NAME} PRIVATE
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(ADD_JSON_LIB)
target_link_libraries(${TARGET_NAME} PRIVATE
if(EIVE_ADD_JSON_LIB)
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC
${LIB_JSON_NAME}
)
endif()
target_link_libraries(${TARGET_NAME} PRIVATE
target_link_libraries(${LIB_EIVE_MISSION} PUBLIC
${LIB_CXX_FS}
)
# Add include paths for all sources.
target_include_directories(${TARGET_NAME} PRIVATE
target_include_directories(${LIB_EIVE_MISSION} PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${FSFW_CONFIG_PATH}
${CMAKE_CURRENT_BINARY_DIR}
${ARCSEC_LIB_PATH}
)
${LIB_ARCSEC_PATH}
)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(WARNING_FLAGS
-Wall
-Wextra
-Wimplicit-fallthrough=1
-Wno-unused-parameter
-Wno-psabi
)
# Remove unused sections.
target_compile_options(${TARGET_NAME} PRIVATE
"-ffunction-sections"
"-fdata-sections"
)
# Removed unused sections.
target_link_options(${TARGET_NAME} PRIVATE
"-Wl,--gc-sections"
)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(COMPILER_FLAGS "/permissive-")
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)
@ -293,11 +386,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

202
LICENSE Normal file
View File

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

13
NOTICE Normal file
View File

@ -0,0 +1,13 @@
Copyright 2021 Institute of Space Systems (IRS), University of Stuttgart
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

257
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)
@ -65,7 +70,7 @@ prerequisites.
as a [separate download](#arm-toolchain)
2. [Q7S sysroot](#q7s-sysroot) on local development machine
3. Recommended: Eclipse or [Vivado 2018.2 SDK](#vivado) for OBSW development
3. [TCF agent] running on Q7S
3. [TCF agent](https://wiki.eclipse.org/TCF) running on Q7S
## Hardware Design
@ -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
@ -251,21 +282,13 @@ You then need to run `scp` with the `-P 1535` flag with `localhost` as the targe
## Port forwarding for TMTC commanding
If you are using the UDP communication interface, you can use:
You can enable port forwarding for TMTC commanding with the following command:
```sh
ssh -L 1536:192.168.133.10:7301 eive@2001:7c0:2018:1099:babe:0:e1fe:f1a5 -t /bin/bash
```
This forwards UDP TMTC packets on port `1536` of localhost to the TMTC reception port of the Q7S.
For TCP, you can use
```sh
ssh -L 1537:192.168.133.10:7303 eive@2001:7c0:2018:1099:babe:0:e1fe:f1a5 -t /bin/bash
```
This forwards TCP TMTC packets on port `1537` of localhost to the TMTC reception port of the Q7S.
This forwards TMTC packets on port `1536` of localhost to the TMTC reception port of the Q7S.
## Set up all port forwarding at once
@ -332,6 +355,33 @@ For Linux, you can also download a more recent version of the
[Linaro 8.3.0 cross-compiler](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads)
from [here](https://developer.arm.com/-/media/Files/downloads/gnu-a/8.3-2019.03/binrel/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz?revision=e09a1c45-0ed3-4a8e-b06b-db3978fd8d56&la=en&hash=93ED4444B8B3A812B893373B490B90BBB28FD2E3)
### Compatibility issues with wayland on more recent Linux distributions
If Vivado crashes and you find following lines in the `hs_err_pid*` files:
```sh
#
# An unexpected error has occurred (11)
#
Stack:
/opt/Xilinx/Vivado/2017.4/tps/lnx64/jre/lib/amd64/server/libjvm.so(+0x923da9) [0x7f666cf5eda9]
/opt/Xilinx/Vivado/2017.4/tps/lnx64/jre/lib/amd64/server/libjvm.so(JVM_handle_linux_signal+0xb6) [0x7f666cf653f6]
/opt/Xilinx/Vivado/2017.4/tps/lnx64/jre/lib/amd64/server/libjvm.so(+0x9209d3) [0x7f666cf5b9d3]
/lib/x86_64-linux-gnu/libc.so.6(+0x35fc0) [0x7f66a993efc0]
/opt/Xilinx/Vivado/2017.4/tps/lnx64/jre/lib/amd64/libawt_xawt.so(+0x42028) [0x7f664e24d028]
...
```
You can [solve this](https://forums.xilinx.com/t5/Design-Entry/Bug-Vivado-2017-4-crashing-on-rightclick-in-console-log/td-p/881811)
by logging in with `xorg` like specified [here](https://www.maketecheasier.com/switch-xorg-wayland-ubuntu1710/).
### Using `docnav` on more recent Linux versions
If you want to use `docnav` for navigating Xilinx documentation, it is recommended to install
it as a standalone version from [here](https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/documentation-nav.html).
This is because the `docnav` installed as part of version 2018.2 requires `libpng12`, which is not part of
more recent disitributions anymore.
## <a id="arm-toolchain"></a> Installing toolchain without Vivado
You can download the toolchains for Windows and Linux
@ -392,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
@ -495,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.
@ -535,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
@ -932,28 +1051,22 @@ Reading data from CAN:
candump can0
````
## Dump content of file in hex
````
cat file.bin | hexdump -C
````
All content will be printed with
````
cat file.bin | hexdump -v
````
To print only the first X bytes of a file
````
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
@ -1001,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.
@ -1040,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.
@ -1059,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

@ -0,0 +1,32 @@
#include "GpioCookie.h"
#include <fsfw/serviceinterface/ServiceInterface.h>
GpioCookie::GpioCookie() {}
ReturnValue_t GpioCookie::addGpio(gpioId_t gpioId, GpioBase* gpioConfig) {
if (gpioConfig == nullptr) {
sif::debug << "GpioCookie::addGpio: gpioConfig is nullpointer" << std::endl;
return HasReturnvaluesIF::RETURN_FAILED;
}
auto gpioMapIter = gpioMap.find(gpioId);
if (gpioMapIter == gpioMap.end()) {
auto statusPair = gpioMap.emplace(gpioId, gpioConfig);
if (statusPair.second == false) {
#if FSFW_VERBOSE_LEVEL >= 1
sif::error << "GpioCookie::addGpio: Failed to add GPIO " << gpioId << " to GPIO map"
<< std::endl;
#endif
return HasReturnvaluesIF::RETURN_FAILED;
}
return HasReturnvaluesIF::RETURN_OK;
}
#if FSFW_VERBOSE_LEVEL >= 1
sif::error << "GpioCookie::addGpio: GPIO already exists in GPIO map " << std::endl;
#endif
return HasReturnvaluesIF::RETURN_FAILED;
}
GpioMap GpioCookie::getGpioMap() const { return gpioMap; }
GpioCookie::~GpioCookie() {}

View File

@ -1,11 +1,12 @@
#ifndef LINUX_GPIO_GPIOCOOKIE_H_
#define LINUX_GPIO_GPIOCOOKIE_H_
#include "GpioIF.h"
#include "gpioDefinitions.h"
#include <fsfw/devicehandlers/CookieIF.h>
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
#include "GpioIF.h"
#include "gpioDefinitions.h"
/**
* @brief Cookie for the GpioIF. Allows the GpioIF to determine which
* GPIOs to initialize and whether they should be configured as in- or
@ -16,24 +17,23 @@
*
* @author J. Meier
*/
class GpioCookie: public CookieIF {
public:
class GpioCookie : public CookieIF {
public:
GpioCookie();
GpioCookie();
virtual ~GpioCookie();
virtual ~GpioCookie();
ReturnValue_t addGpio(gpioId_t gpioId, GpioBase* gpioConfig);
/**
* @brief Get map with registered GPIOs.
*/
GpioMap getGpioMap() const;
ReturnValue_t addGpio(gpioId_t gpioId, GpioBase* gpioConfig);
/**
* @brief Get map with registered GPIOs.
*/
GpioMap getGpioMap() const;
private:
/**
* Returns a copy of the internal GPIO map.
*/
GpioMap gpioMap;
private:
/**
* Returns a copy of the internal GPIO map.
*/
GpioMap gpioMap;
};
#endif /* LINUX_GPIO_GPIOCOOKIE_H_ */

54
archive/gpio/GpioIF.h Normal file
View File

@ -0,0 +1,54 @@
#ifndef LINUX_GPIO_GPIOIF_H_
#define LINUX_GPIO_GPIOIF_H_
#include <fsfw/devicehandlers/CookieIF.h>
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
#include "gpioDefinitions.h"
class GpioCookie;
/**
* @brief This class defines the interface for objects requiring the control
* over GPIOs.
* @author J. Meier
*/
class GpioIF : public HasReturnvaluesIF {
public:
virtual ~GpioIF(){};
/**
* @brief Called by the GPIO using object.
* @param cookie Cookie specifying informations of the GPIOs required
* by a object.
*/
virtual ReturnValue_t addGpios(GpioCookie* cookie) = 0;
/**
* @brief By implementing this function a child must provide the
* functionality to pull a certain GPIO to high logic level.
*
* @param gpioId A unique number which specifies the GPIO to drive.
* @return Returns RETURN_OK for success. This should never return RETURN_FAILED.
*/
virtual ReturnValue_t pullHigh(gpioId_t gpioId) = 0;
/**
* @brief By implementing this function a child must provide the
* functionality to pull a certain GPIO to low logic level.
*
* @param gpioId A unique number which specifies the GPIO to drive.
*/
virtual ReturnValue_t pullLow(gpioId_t gpioId) = 0;
/**
* @brief This function requires a child to implement the functionality to read the state of
* an ouput or input gpio.
*
* @param gpioId A unique number which specifies the GPIO to read.
* @param gpioState State of GPIO will be written to this pointer.
*/
virtual ReturnValue_t readGpio(gpioId_t gpioId, int* gpioState) = 0;
};
#endif /* LINUX_GPIO_GPIOIF_H_ */

View File

@ -0,0 +1,295 @@
#include "LinuxLibgpioIF.h"
#include <fsfw/serviceinterface/ServiceInterface.h>
#include <gpiod.h>
#include <linux/gpio/gpioDefinitions.h>
#include <unistd.h>
#include <utility>
#include "GpioCookie.h"
LinuxLibgpioIF::LinuxLibgpioIF(object_id_t objectId) : SystemObject(objectId) {
struct gpiod_chip* chip = gpiod_chip_open_by_label("/amba_pl/gpio@42030000");
sif::debug << chip->name << std::endl;
}
LinuxLibgpioIF::~LinuxLibgpioIF() {}
ReturnValue_t LinuxLibgpioIF::addGpios(GpioCookie* gpioCookie) {
ReturnValue_t result;
if (gpioCookie == nullptr) {
sif::error << "LinuxLibgpioIF::initialize: Invalid cookie" << std::endl;
return RETURN_FAILED;
}
GpioMap mapToAdd = gpioCookie->getGpioMap();
/* Check whether this ID already exists in the map and remove duplicates */
result = checkForConflicts(mapToAdd);
if (result != RETURN_OK) {
return result;
}
result = configureGpios(mapToAdd);
if (result != RETURN_OK) {
return RETURN_FAILED;
}
/* Register new GPIOs in gpioMap */
gpioMap.insert(mapToAdd.begin(), mapToAdd.end());
return RETURN_OK;
}
ReturnValue_t LinuxLibgpioIF::configureGpios(GpioMap& mapToAdd) {
for (auto& gpioConfig : mapToAdd) {
switch (gpioConfig.second->gpioType) {
case (gpio::GpioTypes::NONE): {
return GPIO_INVALID_INSTANCE;
}
case (gpio::GpioTypes::GPIOD_REGULAR): {
GpiodRegular* regularGpio = dynamic_cast<GpiodRegular*>(gpioConfig.second);
if (regularGpio == nullptr) {
return GPIO_INVALID_INSTANCE;
}
configureRegularGpio(gpioConfig.first, regularGpio);
break;
}
case (gpio::GpioTypes::CALLBACK): {
auto gpioCallback = dynamic_cast<GpioCallback*>(gpioConfig.second);
if (gpioCallback->callback == nullptr) {
return GPIO_INVALID_INSTANCE;
}
gpioCallback->callback(gpioConfig.first, gpio::GpioOperation::WRITE,
gpioCallback->initValue, gpioCallback->callbackArgs);
}
}
}
return RETURN_OK;
}
ReturnValue_t LinuxLibgpioIF::configureRegularGpio(gpioId_t gpioId, GpiodRegular* regularGpio) {
std::string chipname;
unsigned int lineNum;
struct gpiod_chip* chip;
gpio::Direction direction;
std::string consumer;
struct gpiod_line* lineHandle;
int result = 0;
chipname = regularGpio->chipname;
chip = gpiod_chip_open_by_name(chipname.c_str());
if (!chip) {
sif::error << "LinuxLibgpioIF::configureGpios: Failed to open chip " << chipname
<< ". Gpio ID: " << gpioId << std::endl;
return RETURN_FAILED;
}
lineNum = regularGpio->lineNum;
lineHandle = gpiod_chip_get_line(chip, lineNum);
if (!lineHandle) {
sif::error << "LinuxLibgpioIF::configureGpios: Failed to open line for GPIO with id " << gpioId
<< std::endl;
gpiod_chip_close(chip);
return RETURN_FAILED;
}
direction = regularGpio->direction;
consumer = regularGpio->consumer;
/* Configure direction and add a description to the GPIO */
switch (direction) {
case (gpio::OUT): {
result = gpiod_line_request_output(lineHandle, consumer.c_str(), regularGpio->initValue);
if (result < 0) {
sif::error << "LinuxLibgpioIF::configureGpios: Failed to request line " << lineNum
<< " from GPIO instance with ID: " << gpioId << std::endl;
gpiod_line_release(lineHandle);
return RETURN_FAILED;
}
break;
}
case (gpio::IN): {
result = gpiod_line_request_input(lineHandle, consumer.c_str());
if (result < 0) {
sif::error << "LinuxLibgpioIF::configureGpios: Failed to request line " << lineNum
<< " from GPIO instance with ID: " << gpioId << std::endl;
gpiod_line_release(lineHandle);
return RETURN_FAILED;
}
break;
}
default: {
sif::error << "LinuxLibgpioIF::configureGpios: Invalid direction specified" << std::endl;
return GPIO_INVALID_INSTANCE;
}
}
/**
* Write line handle to GPIO configuration instance so it can later be used to set or
* read states of GPIOs.
*/
regularGpio->lineHandle = lineHandle;
return RETURN_OK;
}
ReturnValue_t LinuxLibgpioIF::pullHigh(gpioId_t gpioId) {
gpioMapIter = gpioMap.find(gpioId);
if (gpioMapIter == gpioMap.end()) {
sif::warning << "LinuxLibgpioIF::driveGpio: Unknown GPIOD ID " << gpioId << std::endl;
return UNKNOWN_GPIO_ID;
}
if (gpioMapIter->second->gpioType == gpio::GpioTypes::GPIOD_REGULAR) {
return driveGpio(gpioId, dynamic_cast<GpiodRegular*>(gpioMapIter->second), 1);
} else {
auto gpioCallback = dynamic_cast<GpioCallback*>(gpioMapIter->second);
if (gpioCallback->callback == nullptr) {
return GPIO_INVALID_INSTANCE;
}
gpioCallback->callback(gpioMapIter->first, gpio::GpioOperation::WRITE, 1,
gpioCallback->callbackArgs);
}
return GPIO_TYPE_FAILURE;
}
ReturnValue_t LinuxLibgpioIF::pullLow(gpioId_t gpioId) {
gpioMapIter = gpioMap.find(gpioId);
if (gpioMapIter == gpioMap.end()) {
sif::warning << "LinuxLibgpioIF::driveGpio: Unknown GPIOD ID " << gpioId << std::endl;
return UNKNOWN_GPIO_ID;
}
if (gpioMapIter->second->gpioType == gpio::GpioTypes::GPIOD_REGULAR) {
return driveGpio(gpioId, dynamic_cast<GpiodRegular*>(gpioMapIter->second), 0);
} else {
auto gpioCallback = dynamic_cast<GpioCallback*>(gpioMapIter->second);
if (gpioCallback->callback == nullptr) {
return GPIO_INVALID_INSTANCE;
}
gpioCallback->callback(gpioMapIter->first, gpio::GpioOperation::WRITE, 0,
gpioCallback->callbackArgs);
}
return GPIO_TYPE_FAILURE;
}
ReturnValue_t LinuxLibgpioIF::driveGpio(gpioId_t gpioId, GpiodRegular* regularGpio,
unsigned int logicLevel) {
if (regularGpio == nullptr) {
return GPIO_TYPE_FAILURE;
}
int result = gpiod_line_set_value(regularGpio->lineHandle, logicLevel);
if (result < 0) {
sif::warning << "LinuxLibgpioIF::driveGpio: Failed to pull GPIO with ID " << gpioId
<< " to logic level " << logicLevel << std::endl;
return DRIVE_GPIO_FAILURE;
}
return RETURN_OK;
}
ReturnValue_t LinuxLibgpioIF::readGpio(gpioId_t gpioId, int* gpioState) {
gpioMapIter = gpioMap.find(gpioId);
if (gpioMapIter == gpioMap.end()) {
sif::warning << "LinuxLibgpioIF::readGpio: Unknown GPIOD ID " << gpioId << std::endl;
return UNKNOWN_GPIO_ID;
}
if (gpioMapIter->second->gpioType == gpio::GpioTypes::GPIOD_REGULAR) {
GpiodRegular* regularGpio = dynamic_cast<GpiodRegular*>(gpioMapIter->second);
if (regularGpio == nullptr) {
return GPIO_TYPE_FAILURE;
}
*gpioState = gpiod_line_get_value(regularGpio->lineHandle);
} else {
}
return RETURN_OK;
}
ReturnValue_t LinuxLibgpioIF::checkForConflicts(GpioMap& mapToAdd) {
ReturnValue_t status = HasReturnvaluesIF::RETURN_OK;
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
for (auto& gpioConfig : mapToAdd) {
switch (gpioConfig.second->gpioType) {
case (gpio::GpioTypes::GPIOD_REGULAR): {
auto regularGpio = dynamic_cast<GpiodRegular*>(gpioConfig.second);
if (regularGpio == nullptr) {
return GPIO_TYPE_FAILURE;
}
/* Check for conflicts and remove duplicates if necessary */
result = checkForConflictsRegularGpio(gpioConfig.first, regularGpio, mapToAdd);
if (result != HasReturnvaluesIF::RETURN_OK) {
status = result;
}
break;
}
case (gpio::GpioTypes::CALLBACK): {
auto callbackGpio = dynamic_cast<GpioCallback*>(gpioConfig.second);
if (callbackGpio == nullptr) {
return GPIO_TYPE_FAILURE;
}
/* Check for conflicts and remove duplicates if necessary */
result = checkForConflictsCallbackGpio(gpioConfig.first, callbackGpio, mapToAdd);
if (result != HasReturnvaluesIF::RETURN_OK) {
status = result;
}
break;
}
default: {
}
}
}
return status;
}
ReturnValue_t LinuxLibgpioIF::checkForConflictsRegularGpio(gpioId_t gpioIdToCheck,
GpiodRegular* gpioToCheck,
GpioMap& mapToAdd) {
/* Cross check with private map */
gpioMapIter = gpioMap.find(gpioIdToCheck);
if (gpioMapIter != gpioMap.end()) {
if (gpioMapIter->second->gpioType != gpio::GpioTypes::GPIOD_REGULAR) {
sif::warning << "LinuxLibgpioIF::checkForConflicts: ID already exists for different "
"GPIO type"
<< gpioIdToCheck << ". Removing duplicate." << std::endl;
mapToAdd.erase(gpioIdToCheck);
return HasReturnvaluesIF::RETURN_OK;
}
auto ownRegularGpio = dynamic_cast<GpiodRegular*>(gpioMapIter->second);
if (ownRegularGpio == nullptr) {
return GPIO_TYPE_FAILURE;
}
/* Remove element from map to add because a entry for this GPIO
already exists */
sif::warning << "LinuxLibgpioIF::checkForConflictsRegularGpio: Duplicate GPIO definition"
<< " detected. Duplicate will be removed from map to add." << std::endl;
mapToAdd.erase(gpioIdToCheck);
}
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t LinuxLibgpioIF::checkForConflictsCallbackGpio(gpioId_t gpioIdToCheck,
GpioCallback* callbackGpio,
GpioMap& mapToAdd) {
/* Cross check with private map */
gpioMapIter = gpioMap.find(gpioIdToCheck);
if (gpioMapIter != gpioMap.end()) {
if (gpioMapIter->second->gpioType != gpio::GpioTypes::CALLBACK) {
sif::warning << "LinuxLibgpioIF::checkForConflicts: ID already exists for different "
"GPIO type"
<< gpioIdToCheck << ". Removing duplicate." << std::endl;
mapToAdd.erase(gpioIdToCheck);
return HasReturnvaluesIF::RETURN_OK;
}
/* Remove element from map to add because a entry for this GPIO
already exists */
sif::warning << "LinuxLibgpioIF::checkForConflictsRegularGpio: Duplicate GPIO definition"
<< " detected. Duplicate will be removed from map to add." << std::endl;
mapToAdd.erase(gpioIdToCheck);
}
return HasReturnvaluesIF::RETURN_OK;
}

View File

@ -0,0 +1,75 @@
#ifndef LINUX_GPIO_LINUXLIBGPIOIF_H_
#define LINUX_GPIO_LINUXLIBGPIOIF_H_
#include <fsfw/objectmanager/SystemObject.h>
#include <fsfwconfig/returnvalues/classIds.h>
#include <linux/gpio/GpioIF.h>
class GpioCookie;
/**
* @brief This class implements the GpioIF for a linux based system. The
* implementation is based on the libgpiod lib which requires linux 4.8
* or higher.
* @note The Petalinux SDK from Xilinx supports libgpiod since Petalinux
* 2019.1.
*/
class LinuxLibgpioIF : public GpioIF, public SystemObject {
public:
static const uint8_t gpioRetvalId = CLASS_ID::LINUX_LIBGPIO_IF;
static constexpr ReturnValue_t UNKNOWN_GPIO_ID =
HasReturnvaluesIF::makeReturnCode(gpioRetvalId, 1);
static constexpr ReturnValue_t DRIVE_GPIO_FAILURE =
HasReturnvaluesIF::makeReturnCode(gpioRetvalId, 2);
static constexpr ReturnValue_t GPIO_TYPE_FAILURE =
HasReturnvaluesIF::makeReturnCode(gpioRetvalId, 3);
static constexpr ReturnValue_t GPIO_INVALID_INSTANCE =
HasReturnvaluesIF::makeReturnCode(gpioRetvalId, 4);
LinuxLibgpioIF(object_id_t objectId);
virtual ~LinuxLibgpioIF();
ReturnValue_t addGpios(GpioCookie* gpioCookie) override;
ReturnValue_t pullHigh(gpioId_t gpioId) override;
ReturnValue_t pullLow(gpioId_t gpioId) override;
ReturnValue_t readGpio(gpioId_t gpioId, int* gpioState) override;
private:
/* Holds the information and configuration of all used GPIOs */
GpioMap gpioMap;
GpioMapIter gpioMapIter;
/**
* @brief This functions drives line of a GPIO specified by the GPIO ID.
*
* @param gpioId The GPIO ID of the GPIO to drive.
* @param logiclevel The logic level to set. O or 1.
*/
ReturnValue_t driveGpio(gpioId_t gpioId, GpiodRegularBase& regularGpio, unsigned int logiclevel);
ReturnValue_t configureRegularGpio(gpioId_t gpioId, GpiodRegularBase& regularGpio);
/**
* @brief This function checks if GPIOs are already registered and whether
* there exists a conflict in the GPIO configuration. E.g. the
* direction.
*
* @param mapToAdd The GPIOs which shall be added to the gpioMap.
*
* @return RETURN_OK if successful, otherwise RETURN_FAILED
*/
ReturnValue_t checkForConflicts(GpioMap& mapToAdd);
ReturnValue_t checkForConflictsRegularGpio(gpioId_t gpiodId, GpiodRegular* regularGpio,
GpioMap& mapToAdd);
ReturnValue_t checkForConflictsCallbackGpio(gpioId_t gpiodId, GpioCallback* regularGpio,
GpioMap& mapToAdd);
/**
* @brief Performs the initial configuration of all GPIOs specified in the GpioMap mapToAdd.
*/
ReturnValue_t configureGpios(GpioMap& mapToAdd);
};
#endif /* LINUX_GPIO_LINUXLIBGPIOIF_H_ */

View File

@ -0,0 +1,83 @@
#ifndef LINUX_GPIO_GPIODEFINITIONS_H_
#define LINUX_GPIO_GPIODEFINITIONS_H_
#include <string>
#include <unordered_map>
using gpioId_t = uint16_t;
namespace gpio {
enum Levels { LOW = 0, HIGH = 1 };
enum Direction { IN = 0, OUT = 1 };
enum GpioOperation { READ, WRITE };
enum GpioTypes { NONE, GPIOD_REGULAR, CALLBACK };
static constexpr gpioId_t NO_GPIO = -1;
} // namespace gpio
/**
* @brief Struct containing information about the GPIO to use. This is
* required by the libgpiod to access and drive a GPIO.
* @param chipname String of the chipname specifying the group which contains the GPIO to
* access. E.g. gpiochip0. To detect names of GPIO groups run gpiodetect on
* the linux command line.
* @param lineNum The offset of the GPIO within the GPIO group.
* @param consumer Name of the consumer. Simply a description of the GPIO configuration.
* @param direction Specifies whether the GPIO should be used as in- or output.
* @param initValue Defines the initial state of the GPIO when configured as output.
* Only required for output GPIOs.
* @param lineHandle The handle returned by gpiod_chip_get_line will be later written to this
* pointer.
*/
class GpioBase {
public:
GpioBase() = default;
GpioBase(gpio::GpioTypes gpioType, std::string consumer, gpio::Direction direction, int initValue)
: gpioType(gpioType), consumer(consumer), direction(direction), initValue(initValue) {}
virtual ~GpioBase(){};
/* Can be used to cast GpioBase to a concrete child implementation */
gpio::GpioTypes gpioType = gpio::GpioTypes::NONE;
std::string consumer;
gpio::Direction direction = gpio::Direction::IN;
int initValue = 0;
};
class GpiodRegular : public GpioBase {
public:
GpiodRegular()
: GpioBase(gpio::GpioTypes::GPIOD_REGULAR, std::string(), gpio::Direction::IN, 0){};
GpiodRegular(std::string chipname_, int lineNum_, std::string consumer_,
gpio::Direction direction_, int initValue_)
: GpioBase(gpio::GpioTypes::GPIOD_REGULAR, consumer_, direction_, initValue_),
chipname(chipname_),
lineNum(lineNum_) {}
std::string chipname;
int lineNum = 0;
struct gpiod_line* lineHandle = nullptr;
};
class GpioCallback : public GpioBase {
public:
GpioCallback(std::string consumer, gpio::Direction direction_, int initValue_,
void (*callback)(gpioId_t gpioId, gpio::GpioOperation gpioOp, int value, void* args),
void* callbackArgs)
: GpioBase(gpio::GpioTypes::CALLBACK, consumer, direction_, initValue_),
callback(callback),
callbackArgs(callbackArgs) {}
void (*callback)(gpioId_t gpioId, gpio::GpioOperation gpioOp, int value, void* args) = nullptr;
void* callbackArgs = nullptr;
};
using GpioMap = std::unordered_map<gpioId_t, GpioBase*>;
using GpioMapIter = GpioMap::iterator;
#endif /* LINUX_GPIO_GPIODEFINITIONS_H_ */

View File

@ -0,0 +1,128 @@
#include <fcntl.h>
#include <linux/obc/Ptme.h>
#include <sys/mman.h>
CCSDSIPCoreBridge::CCSDSIPCoreBridge(object_id_t objectId, object_id_t tcDestination,
object_id_t tmStoreId, object_id_t tcStoreId,
LinuxLibgpioIF* gpioComIF, std::string uioPtme,
gpioId_t papbBusyId, gpioId_t papbEmptyId)
: TmTcBridge(objectId, tcDestination, tmStoreId, tcStoreId),
gpioComIF(gpioComIF),
uioPtme(uioPtme),
papbBusyId(papbBusyId),
papbEmptyId(papbEmptyId) {}
CCSDSIPCoreBridge::~CCSDSIPCoreBridge() {}
ReturnValue_t CCSDSIPCoreBridge::initialize() {
ReturnValue_t result = TmTcBridge::initialize();
fd = open("/dev/uio0", O_RDWR);
if (fd < 1) {
sif::debug << "CCSDSIPCoreBridge::initialize: Invalid UIO device file" << std::endl;
return RETURN_FAILED;
}
/**
* Map uio device in virtual address space
* PROT_WRITE: Map uio device in writable only mode
*/
ptmeBaseAddress =
static_cast<uint32_t*>(mmap(NULL, MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0));
if (ptmeBaseAddress == MAP_FAILED) {
sif::error << "CCSDSIPCoreBridge::initialize: Failed to map uio address" << std::endl;
return RETURN_FAILED;
}
return result;
}
ReturnValue_t CCSDSIPCoreBridge::handleTm() {
#if OBSW_TEST_CCSDS_PTME == 1
return sendTestFrame();
#else
return TmTcBridge::handleTm();
#endif
}
ReturnValue_t CCSDSIPCoreBridge::sendTm(const uint8_t* data, size_t dataLen) {
if (pollPapbBusySignal() == RETURN_OK) {
startPacketTransfer();
}
for (size_t idx = 0; idx < dataLen; idx++) {
if (pollPapbBusySignal() == RETURN_OK) {
*(ptmeBaseAddress + PTME_DATA_REG_OFFSET) = static_cast<uint32_t>(*(data + idx));
} else {
sif::debug << "CCSDSIPCoreBridge::sendTm: Only written " << idx - 1 << " of " << dataLen
<< " data" << std::endl;
return RETURN_FAILED;
}
}
if (pollPapbBusySignal() == RETURN_OK) {
endPacketTransfer();
}
return RETURN_OK;
}
void CCSDSIPCoreBridge::startPacketTransfer() { *ptmeBaseAddress = PTME_CONFIG_START; }
void CCSDSIPCoreBridge::endPacketTransfer() { *ptmeBaseAddress = PTME_CONFIG_END; }
ReturnValue_t CCSDSIPCoreBridge::pollPapbBusySignal() {
int papbBusyState = 0;
ReturnValue_t result = RETURN_OK;
/** Check if PAPB interface is ready to receive data */
result = gpioComIF->readGpio(papbBusyId, &papbBusyState);
if (result != RETURN_OK) {
sif::debug << "CCSDSIPCoreBridge::pollPapbBusySignal: Failed to read papb busy signal"
<< std::endl;
return RETURN_FAILED;
}
if (!papbBusyState) {
sif::debug << "CCSDSIPCoreBridge::pollPapbBusySignal: PAPB busy" << std::endl;
return PAPB_BUSY;
}
return RETURN_OK;
}
void CCSDSIPCoreBridge::isPtmeBufferEmpty() {
ReturnValue_t result = RETURN_OK;
int papbEmptyState = 1;
result = gpioComIF->readGpio(papbEmptyId, &papbEmptyState);
if (result != RETURN_OK) {
sif::debug << "CCSDSIPCoreBridge::isPtmeBufferEmpty: Failed to read papb empty signal"
<< std::endl;
return;
}
if (papbEmptyState == 1) {
sif::debug << "CCSDSIPCoreBridge::isPtmeBufferEmpty: Buffer is empty" << std::endl;
} else {
sif::debug << "CCSDSIPCoreBridge::isPtmeBufferEmpty: Buffer is not empty" << std::endl;
}
return;
}
ReturnValue_t CCSDSIPCoreBridge::sendTestFrame() {
/** Size of one complete transfer frame data field amounts to 1105 bytes */
uint8_t testPacket[1105];
/** Fill one test packet */
for (int idx = 0; idx < 1105; idx++) {
testPacket[idx] = static_cast<uint8_t>(idx & 0xFF);
}
ReturnValue_t result = sendTm(testPacket, 1105);
if (result != RETURN_OK) {
return result;
}
return RETURN_OK;
}

View File

@ -0,0 +1,129 @@
#ifndef MISSION_OBC_CCSDSIPCOREBRIDGE_H_
#define MISSION_OBC_CCSDSIPCOREBRIDGE_H_
#include <fsfw/tmtcservices/TmTcBridge.h>
#include <fsfw_hal/common/gpio/gpioDefinitions.h>
#include <fsfw_hal/linux/gpio/LinuxLibgpioIF.h>
#include <cstring>
#include "OBSWConfig.h"
/**
* @brief This class handles the interfacing to the telemetry (PTME) and telecommand (PDEC) IP
* cores responsible for the CCSDS encoding and decoding. The IP cores are implemented
* on the programmable logic and are accessible through the linux UIO driver.
*/
class CCSDSIPCoreBridge : public TmTcBridge {
public:
/**
* @brief Constructor
*
* @param objectId
* @param tcDestination
* @param tmStoreId
* @param tcStoreId
* @param uioPtme Name of the uio device file which provides access to the PTME IP Core.
* @param papbBusyId The ID of the GPIO which is connected to the PAPBBusy_N signal of the
* PTME IP Core. A low logic level indicates the PTME is not ready to
* receive more data.
* @param papbEmptyId The ID of the GPIO which is connected to the PAPBEmpty signal of the
* PTME IP Core. The signal is high when there are no packets in the
* external buffer memory (BRAM).
*/
CCSDSIPCoreBridge(object_id_t objectId, object_id_t tcDestination, object_id_t tmStoreId,
object_id_t tcStoreId, LinuxLibgpioIF* gpioComIF, std::string uioPtme,
gpioId_t papbBusyId, gpioId_t papbEmptyId);
virtual ~CCSDSIPCoreBridge();
ReturnValue_t initialize() override;
protected:
/**
* Overwriting this function to provide the capability of testing the PTME IP Core
* implementation.
*/
virtual ReturnValue_t handleTm() override;
virtual ReturnValue_t sendTm(const uint8_t* data, size_t dataLen) override;
private:
static const uint8_t INTERFACE_ID = CLASS_ID::CCSDS_IP_CORE_BRIDGE;
static const ReturnValue_t PAPB_BUSY = MAKE_RETURN_CODE(0xA0);
/** Size of mapped address space. 4k (minimal size of pl device) */
// static const int MAP_SIZE = 0xFA0;
static const int MAP_SIZE = 0x1000;
/**
* Configuration bits:
* bit[1:0]: Size of data (1,2,3 or 4 bytes). 1 Byte <=> b00
* bit[2]: Set this bit to 1 to abort a transfered packet
* bit[3]: Signals to PTME the start of a new telemetry packet
*/
static const uint32_t PTME_CONFIG_START = 0x8;
/**
* Writing this word to the ptme base address signals to the PTME that a complete tm packet has
* been transferred.
*/
static const uint32_t PTME_CONFIG_END = 0x0;
/**
* Writing to this offset within the PTME memory space will insert data for encoding to the
* PTME IP core.
* The address offset is 0x400 (= 4 * 256)
*/
static const int PTME_DATA_REG_OFFSET = 256;
LinuxLibgpioIF* gpioComIF = nullptr;
/** The uio device file related to the PTME IP Core */
std::string uioPtme;
/** Pulled to low when PTME not ready to receive data */
gpioId_t papbBusyId = gpio::NO_GPIO;
/** High when externally buffer memory of PTME is empty */
gpioId_t papbEmptyId = gpio::NO_GPIO;
/** The file descriptor of the UIO driver */
int fd;
uint32_t* ptmeBaseAddress = nullptr;
/**
* @brief This function sends the config byte to the PTME IP Core to initiate a packet
* transfer.
*/
void startPacketTransfer();
/**
* @brief This function sends the config byte to the PTME IP Core to signal the end of a
* packet transfer.
*/
void endPacketTransfer();
/**
* @brief This function reads the papb busy signal indicating whether the PAPB interface is
* ready to receive more data or not. PAPB is ready when PAPB_Busy_N == '1'.
*
* @return RETURN_OK when ready to receive data else PAPB_BUSY.
*/
ReturnValue_t pollPapbBusySignal();
/**
* @brief This function can be used for debugging to check wheter there are packets in
* the packet buffer of the PTME or not.
*/
void isPtmeBufferEmpty();
/**
* @brief This function sends a complete telemetry transfer frame data field (1105 bytes)
* to the input of the PTME IP Core. Can be used to test the implementation.
*/
ReturnValue_t sendTestFrame();
};
#endif /* MISSION_OBC_CCSDSIPCOREBRIDGE_H_ */

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"
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
stages {
stage('Build Container') {
when {
changeset "automation/Dockerfile-q7s"
branch 'develop'
}
steps {
sh 'docker build -t eive-fsw-build-q7s:gcc8 - < automation/Dockerfile-q7s'
}
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('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 ..'
sh 'cmake --build . -j'
dir(BUILDDIR_Q7) {
sh 'cmake -DTGT_BSP="arm/q7s" -DCMAKE_BUILD_TYPE=Debug ..'
sh 'cmake --build . -j4'
}
}
}
stage('Deploy') {
when {
tag 'v*.*.*'
}
stage('Unittests') {
steps {
sh 'echo Deploying'
dir(BUILDDIR_LINUX) {
sh 'cmake ..'
sh 'cmake --build . -t eive-unittest -j4'
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
@ -6,5 +6,3 @@ target_sources(${TARGET_NAME} PUBLIC
add_subdirectory(fsfwconfig)
add_subdirectory(boardconfig)

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");
@ -27,133 +26,132 @@ ServiceInterfaceStream sif::warning("WARNING", true);
ServiceInterfaceStream sif::error("ERROR", true, false, true);
#endif
ObjectManagerIF *objectManager = nullptr;
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);
sif::info << "Initializing all objects.." << std::endl;
ObjectManager::instance()->initialize();
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();
/* This function creates and starts all tasks */
initTasks();
}
void initmission::initTasks() {
TaskFactory* factory = TaskFactory::instance();
if(factory == nullptr) {
/* Should never happen ! */
return;
}
TaskFactory* factory = TaskFactory::instance();
if (factory == nullptr) {
/* Should never happen ! */
return;
}
#if OBSW_PRINT_MISSED_DEADLINES == 1
void (*missedDeadlineFunc) (void) = TaskFactory::printMissedDeadline;
void (*missedDeadlineFunc)(void) = TaskFactory::printMissedDeadline;
#else
void (*missedDeadlineFunc) (void) = nullptr;
void (*missedDeadlineFunc)(void) = nullptr;
#endif
/* TMTC Distribution */
PeriodicTaskIF* tmTcDistributor = factory->createPeriodicTask(
"DIST", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
ReturnValue_t 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;
}
/* TMTC Distribution */
PeriodicTaskIF* tmTcDistributor = factory->createPeriodicTask(
"DIST", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
ReturnValue_t 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;
}
/* UDP bridge */
PeriodicTaskIF* tmtcBridgeTask = factory->createPeriodicTask(
"TMTC_UNIX_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;
}
PeriodicTaskIF* tmtcPollingTask = factory->createPeriodicTask(
"UDP_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;
}
/* UDP bridge */
PeriodicTaskIF* tmtcBridgeTask = factory->createPeriodicTask(
"TMTC_UNIX_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;
}
PeriodicTaskIF* tmtcPollingTask = factory->createPeriodicTask(
"UDP_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;
}
/* PUS Services */
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;
}
/* PUS Services */
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;
}
PeriodicTaskIF* pusEvents = factory->createPeriodicTask(
"PUS_EVENTS", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
result = pusVerification->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
if(result != HasReturnvaluesIF::RETURN_OK){
initmission::printAddObjectError("PUS5", objects::PUS_SERVICE_5_EVENT_REPORTING);
}
PeriodicTaskIF* pusEvents = factory->createPeriodicTask(
"PUS_EVENTS", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
result = pusVerification->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS5", objects::PUS_SERVICE_5_EVENT_REPORTING);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
PeriodicTaskIF* testTask = factory->createPeriodicTask(
"TEST_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
PeriodicTaskIF* testTask = factory->createPeriodicTask(
"TEST_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
#if OBSW_ADD_TEST_CODE == 1
result = testTask->addComponent(objects::TEST_TASK);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("TEST_TASK", objects::TEST_TASK);
}
result = testTask->addComponent(objects::TEST_TASK);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("TEST_TASK", objects::TEST_TASK);
}
#endif /* OBSW_ADD_TEST_CODE == 1 */
sif::info << "Starting tasks.." << std::endl;
tmTcDistributor->startTask();
tmtcBridgeTask->startTask();
tmtcPollingTask->startTask();
sif::info << "Starting tasks.." << std::endl;
tmTcDistributor->startTask();
tmtcBridgeTask->startTask();
tmtcPollingTask->startTask();
pusVerification->startTask();
pusEvents->startTask();
pusHighPrio->startTask();
pusMedPrio->startTask();
pusLowPrio->startTask();
pusVerification->startTask();
pusEvents->startTask();
pusHighPrio->startTask();
pusMedPrio->startTask();
pusLowPrio->startTask();
#if OBSW_ADD_TEST_CODE == 1
testTask->startTask();
testTask->startTask();
#endif /* OBSW_ADD_TEST_CODE == 1 */
sif::info << "Tasks started.." << std::endl;
sif::info << "Tasks started.." << 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,42 +20,28 @@
#include <fsfw/tmtcpacket/pus/tm.h>
#if OBSW_ADD_TEST_CODE == 1
#include <test/testtasks/TestTask.h>
#endif
void Factory::setStaticFrameworkObjectIds(){
PusServiceBase::packetSource = objects::PUS_PACKET_DISTRIBUTOR;
PusServiceBase::packetDestination = objects::TM_FUNNEL;
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;
CommandingServiceBase::defaultPacketSource = objects::PUS_PACKET_DISTRIBUTOR;
CommandingServiceBase::defaultPacketDestination = objects::TM_FUNNEL;
TmFunnel::downlinkDestination = objects::TMTC_BRIDGE;
// No storage object for now.
TmFunnel::storageDestination = objects::NO_OBJECT;
TmFunnel::downlinkDestination = objects::TMTC_BRIDGE;
// No storage object for now.
TmFunnel::storageDestination = objects::NO_OBJECT;
VerificationReporter::messageReceiver = objects::PUS_SERVICE_1_VERIFICATION;
TmPacketBase::timeStamperId = objects::TIME_STAMPER;
VerificationReporter::messageReceiver = objects::PUS_SERVICE_1_VERIFICATION;
TmPacketBase::timeStamperId = objects::TIME_STAMPER;
}
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 " <<
TcpTmTcBridge::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);
void ObjectFactory::produce(void* args) {
Factory::setStaticFrameworkObjectIds();
ObjectFactory::produceGenericObjects();
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);
};
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

@ -32,7 +32,7 @@ SOFTWARE.
#define ETL_CHECK_PUSH_POP
#define ETL_CPP11_SUPPORTED 1
#define ETL_NO_NULLPTR_SUPPORT 0
#define ETL_CPP11_SUPPORTED 1
#define ETL_NO_NULLPTR_SUPPORT 0
#endif

View File

@ -6,8 +6,9 @@
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;
sif::info << "GCC GCOV: Please supply GCOV=1 in Makefile if "
"coverage information is desired.\n"
<< std::flush;
}
#endif

View File

@ -3,13 +3,9 @@
#include <stdio.h>
void printChar(const char* character, bool errStream) {
if(errStream) {
putc(*character, stderr);
return;
}
putc(*character, stdout);
if (errStream) {
putc(*character, stderr);
return;
}
putc(*character, stdout);
}

View File

@ -1,376 +1,351 @@
#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);
initialized = false;
serialPort = ::open("/dev/ttyUSB0", O_RDWR);
if (serialPort < 0) {
//configuration error
printf("Error %i from open: %s\n", errno, strerror(errno));
return;
}
if (serialPort < 0) {
// configuration error
printf("Error %i from open: %s\n", errno, strerror(errno));
return;
}
struct termios tty;
memset(&tty, 0, sizeof tty);
struct termios tty;
memset(&tty, 0, sizeof tty);
// Read in existing settings, and handle any error
if (tcgetattr(serialPort, &tty) != 0) {
printf("Error %i from tcgetattr: %s\n", errno, strerror(errno));
return;
}
// Read in existing settings, and handle any error
if (tcgetattr(serialPort, &tty) != 0) {
printf("Error %i from tcgetattr: %s\n", errno, strerror(errno));
return;
}
tty.c_cflag &= ~PARENB; // Clear parity bit, disabling parity
tty.c_cflag &= ~CSTOPB; // Clear stop field, only one stop bit used in communication
tty.c_cflag |= CS8; // 8 bits per byte
tty.c_cflag &= ~CRTSCTS; // Disable RTS/CTS hardware flow control
tty.c_lflag &= ~ICANON; //Disable Canonical Mode
tty.c_oflag &= ~OPOST; // Prevent special interpretation of output bytes (e.g. newline chars)
tty.c_oflag &= ~ONLCR; // Prevent conversion of newline to carriage return/line feed
tty.c_cc[VTIME] = 0; // Non Blocking
tty.c_cc[VMIN] = 0;
tty.c_cflag &= ~PARENB; // Clear parity bit, disabling parity
tty.c_cflag &= ~CSTOPB; // Clear stop field, only one stop bit used in communication
tty.c_cflag |= CS8; // 8 bits per byte
tty.c_cflag &= ~CRTSCTS; // Disable RTS/CTS hardware flow control
tty.c_lflag &= ~ICANON; // Disable Canonical Mode
tty.c_oflag &= ~OPOST; // Prevent special interpretation of output bytes (e.g. newline chars)
tty.c_oflag &= ~ONLCR; // Prevent conversion of newline to carriage return/line feed
tty.c_cc[VTIME] = 0; // Non Blocking
tty.c_cc[VMIN] = 0;
cfsetispeed(&tty, B9600); //Baudrate
cfsetispeed(&tty, B9600); // Baudrate
if (tcsetattr(serialPort, TCSANOW, &tty) != 0) {
//printf("Error %i from tcsetattr: %s\n", errno, strerror(errno));
return;
}
if (tcsetattr(serialPort, TCSANOW, &tty) != 0) {
// printf("Error %i from tcsetattr: %s\n", errno, strerror(errno));
return;
}
initialized = true;
initialized = true;
#elif WIN32
DCB serialParams = { 0 };
DCB serialParams = {0};
// we need to ask the COM port from the user.
if(promptComIF) {
sif::info << "Please enter the COM port (c to cancel): " << std::flush;
std::string comPort;
while(hCom == INVALID_HANDLE_VALUE) {
// we need to ask the COM port from the user.
if (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;
}
const TCHAR *pcCommPort = comPort.c_str();
hCom = CreateFileA(pcCommPort, // port name
GENERIC_READ | GENERIC_WRITE, // Read/Write
0, // No Sharing
NULL, // No Security
OPEN_EXISTING, // Open existing port only
0, // Non Overlapped I/O
NULL); // Null for Comm Devices
std::getline(std::cin, comPort);
if(comPort[0] == 'c') {
break;
}
const TCHAR *pcCommPort = comPort.c_str();
hCom = CreateFileA(pcCommPort, //port name
GENERIC_READ | GENERIC_WRITE, //Read/Write
0, // No Sharing
NULL, // No Security
OPEN_EXISTING,// Open existing port only
0, // Non Overlapped I/O
NULL); // Null for Comm Devices
if (hCom == INVALID_HANDLE_VALUE) {
if (GetLastError() == 2) {
sif::error << "COM Port does not found!" << std::endl;
} else {
TCHAR err[128];
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::error << err << std::flush;
}
sif::info << "Please enter a valid COM port: " << std::flush;
}
}
}
if (hCom == INVALID_HANDLE_VALUE)
{
if(GetLastError() == 2) {
sif::error << "COM Port does not found!" << std::endl;
}
else {
TCHAR err[128];
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::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 {
serialParams.BaudRate = baudRate;
}
}
serialParams.ByteSize = 8;
serialParams.Parity = NOPARITY;
serialParams.StopBits = ONESTOPBIT;
SetCommState(hCom, &serialParams);
serialParams.DCBlength = sizeof(serialParams);
if(baudRate == 9600) {
serialParams.BaudRate = CBR_9600;
}
if(baudRate == 115200) {
serialParams.BaudRate = CBR_115200;
}
else {
serialParams.BaudRate = baudRate;
}
serialParams.ByteSize = 8;
serialParams.Parity = NOPARITY;
serialParams.StopBits = ONESTOPBIT;
SetCommState(hCom, &serialParams);
COMMTIMEOUTS timeout = { 0 };
// This will set the read operation to be blocking until data is received
// and then read continuously until there is a gap of one millisecond.
timeout.ReadIntervalTimeout = 1;
timeout.ReadTotalTimeoutConstant = 0;
timeout.ReadTotalTimeoutMultiplier = 0;
timeout.WriteTotalTimeoutConstant = 0;
timeout.WriteTotalTimeoutMultiplier = 0;
SetCommTimeouts(hCom, &timeout);
// Serial port should now be read for operations.
COMMTIMEOUTS timeout = {0};
// This will set the read operation to be blocking until data is received
// and then read continuously until there is a gap of one millisecond.
timeout.ReadIntervalTimeout = 1;
timeout.ReadTotalTimeoutConstant = 0;
timeout.ReadTotalTimeoutMultiplier = 0;
timeout.WriteTotalTimeoutConstant = 0;
timeout.WriteTotalTimeoutMultiplier = 0;
SetCommTimeouts(hCom, &timeout);
// Serial port should now be read for operations.
#endif
}
ArduinoComIF::~ArduinoComIF() {
#ifdef LINUX
::close(serialPort);
::close(serialPort);
#elif WIN32
CloseHandle(hCom);
CloseHandle(hCom);
#endif
}
ReturnValue_t ArduinoComIF::initializeInterface(CookieIF * cookie) {
return HasReturnvaluesIF::RETURN_OK;
ReturnValue_t ArduinoComIF::initializeInterface(CookieIF *cookie) {
return HasReturnvaluesIF::RETURN_OK;
}
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;
}
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) {
return RETURN_OK;
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) {
handleSerialPortRx();
ArduinoCookie *arduinoCookie = dynamic_cast<ArduinoCookie *>(cookie);
if (arduinoCookie == nullptr) {
return INVALID_COOKIE_TYPE;
}
*buffer = arduinoCookie->replyBuffer.data();
*size = arduinoCookie->receivedDataLen;
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t ArduinoComIF::readReceivedMessage(CookieIF *cookie,
uint8_t **buffer, size_t *size) {
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;
}
handleSerialPortRx();
// being conservative here
uint8_t sendBuffer[(dataLen + 6) * 2 + 2];
ArduinoCookie *arduinoCookie = dynamic_cast<ArduinoCookie*>(cookie);
if (arduinoCookie == nullptr) {
return INVALID_COOKIE_TYPE;
}
sendBuffer[0] = DleEncoder::STX_CHAR;
*buffer = arduinoCookie->replyBuffer.data();
*size = arduinoCookie->receivedDataLen;
return HasReturnvaluesIF::RETURN_OK;
}
uint8_t *currentPosition = sendBuffer + 1;
size_t remainingLen = sizeof(sendBuffer) - 1;
size_t encodedLen = 0;
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;
}
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
//being conservative here
uint8_t sendBuffer[(dataLen + 6) * 2 + 2];
result = DleEncoder::encode(&address, 1, currentPosition, remainingLen, &encodedLen, false);
if (result != RETURN_OK) {
return result;
}
currentPosition += encodedLen;
remainingLen -= encodedLen; // DleEncoder will never return encodedLen > remainingLen
sendBuffer[0] = DleEncoder::STX_CHAR;
uint8_t temporaryBuffer[2];
uint8_t *currentPosition = sendBuffer + 1;
size_t remainingLen = sizeof(sendBuffer) - 1;
size_t encodedLen = 0;
// note to Lukas: yes we _could_ use Serialize here, but for 16 bit it is a bit too much...
temporaryBuffer[0] = dataLen >> 8; // we checked dataLen above
temporaryBuffer[1] = dataLen;
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(temporaryBuffer, 2, 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);
if (result != RETURN_OK) {
return result;
}
currentPosition += encodedLen;
remainingLen -= encodedLen; //DleEncoder will never return encodedLen > remainingLen
// encoding the actual data
result = DleEncoder::encode(data, dataLen, currentPosition, remainingLen, &encodedLen, false);
if (result != RETURN_OK) {
return result;
}
currentPosition += encodedLen;
remainingLen -= encodedLen; // DleEncoder will never return encodedLen > remainingLen
uint8_t temporaryBuffer[2];
uint16_t crc = CRC::crc16ccitt(&command, 1);
crc = CRC::crc16ccitt(&address, 1, crc);
// fortunately the length is still there
crc = CRC::crc16ccitt(temporaryBuffer, 2, crc);
crc = CRC::crc16ccitt(data, dataLen, crc);
//note to Lukas: yes we _could_ use Serialize here, but for 16 bit it is a bit too much...
temporaryBuffer[0] = dataLen >> 8; //we checked dataLen above
temporaryBuffer[1] = dataLen;
temporaryBuffer[0] = crc >> 8;
temporaryBuffer[1] = crc;
result = DleEncoder::encode(temporaryBuffer, 2, currentPosition,
remainingLen, &encodedLen, false);
if (result != RETURN_OK) {
return result;
}
currentPosition += encodedLen;
remainingLen -= encodedLen; //DleEncoder will never return encodedLen > remainingLen
result =
DleEncoder::encode(temporaryBuffer, 2, currentPosition, remainingLen, &encodedLen, false);
if (result != RETURN_OK) {
return result;
}
currentPosition += encodedLen;
remainingLen -= encodedLen; // DleEncoder will never return encodedLen > remainingLen
//encoding the actual data
result = DleEncoder::encode(data, dataLen, currentPosition, remainingLen,
&encodedLen, false);
if (result != RETURN_OK) {
return result;
}
currentPosition += encodedLen;
remainingLen -= encodedLen; //DleEncoder will never return encodedLen > remainingLen
if (remainingLen > 0) {
*currentPosition = DleEncoder::ETX_CHAR;
}
remainingLen -= 1;
uint16_t crc = CRC::crc16ccitt(&command, 1);
crc = CRC::crc16ccitt(&address, 1, crc);
//fortunately the length is still there
crc = CRC::crc16ccitt(temporaryBuffer, 2, crc);
crc = CRC::crc16ccitt(data, dataLen, crc);
temporaryBuffer[0] = crc >> 8;
temporaryBuffer[1] = crc;
result = DleEncoder::encode(temporaryBuffer, 2, currentPosition,
remainingLen, &encodedLen, false);
if (result != RETURN_OK) {
return result;
}
currentPosition += encodedLen;
remainingLen -= encodedLen; //DleEncoder will never return encodedLen > remainingLen
if (remainingLen > 0) {
*currentPosition = DleEncoder::ETX_CHAR;
}
remainingLen -= 1;
encodedLen = sizeof(sendBuffer) - remainingLen;
encodedLen = sizeof(sendBuffer) - remainingLen;
#ifdef LINUX
ssize_t writtenlen = ::write(serialPort, sendBuffer, encodedLen);
if (writtenlen < 0) {
//we could try to find out what happened...
return RETURN_FAILED;
}
if (writtenlen != encodedLen) {
//the OS failed us, we do not try to block until everything is written, as
//we can not block the whole system here
return RETURN_FAILED;
}
return RETURN_OK;
ssize_t writtenlen = ::write(serialPort, sendBuffer, encodedLen);
if (writtenlen < 0) {
// we could try to find out what happened...
return RETURN_FAILED;
}
if (writtenlen != encodedLen) {
// the OS failed us, we do not try to block until everything is written, as
// we can not block the whole system here
return RETURN_FAILED;
}
return RETURN_OK;
#elif WIN32
return HasReturnvaluesIF::RETURN_OK;
return HasReturnvaluesIF::RETURN_OK;
#endif
}
void ArduinoComIF::handleSerialPortRx() {
#ifdef LINUX
uint32_t availableSpace = rxBuffer.availableWriteSpace();
uint32_t availableSpace = rxBuffer.availableWriteSpace();
uint8_t dataFromSerial[availableSpace];
uint8_t dataFromSerial[availableSpace];
ssize_t bytesRead = read(serialPort, dataFromSerial,
sizeof(dataFromSerial));
ssize_t bytesRead = read(serialPort, dataFromSerial, sizeof(dataFromSerial));
if (bytesRead < 0) {
return;
}
if (bytesRead < 0) {
return;
}
rxBuffer.writeData(dataFromSerial, bytesRead);
rxBuffer.writeData(dataFromSerial, bytesRead);
uint8_t dataReceivedSoFar[rxBuffer.getMaxSize()];
uint8_t dataReceivedSoFar[rxBuffer.getMaxSize()];
uint32_t dataLenReceivedSoFar = 0;
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)) {
firstSTXinRawData++;
}
// look for STX
size_t firstSTXinRawData = 0;
while ((firstSTXinRawData < dataLenReceivedSoFar) &&
(dataReceivedSoFar[firstSTXinRawData] != DleEncoder::STX_CHAR)) {
firstSTXinRawData++;
}
if (dataReceivedSoFar[firstSTXinRawData] != DleEncoder::STX_CHAR) {
//there is no STX in our data, throw it away...
rxBuffer.deleteData(dataLenReceivedSoFar);
return;
}
if (dataReceivedSoFar[firstSTXinRawData] != DleEncoder::STX_CHAR) {
// there is no STX in our data, throw it away...
rxBuffer.deleteData(dataLenReceivedSoFar);
return;
}
uint8_t packet[MAX_PACKET_SIZE];
size_t packetLen = 0;
uint8_t packet[MAX_PACKET_SIZE];
size_t packetLen = 0;
size_t readSize = 0;
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) {
handlePacket(packet, packetLen);
size_t toDelete = firstSTXinRawData;
if (result == HasReturnvaluesIF::RETURN_OK) {
handlePacket(packet, packetLen);
// after handling the packet, we can delete it from the raw stream,
// it has been copied to packet
toDelete += readSize;
}
// after handling the packet, we can delete it from the raw stream,
// it has been copied to packet
toDelete += readSize;
}
//remove Data which was processed
rxBuffer.deleteData(toDelete);
// remove Data which was processed
rxBuffer.deleteData(toDelete);
#elif WIN32
#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);
if (crc != 0) {
//CRC error
return;
}
uint16_t crc = CRC::crc16ccitt(packet, packetLen);
if (crc != 0) {
// CRC error
return;
}
uint8_t command = packet[0];
uint8_t address = packet[1];
uint8_t command = packet[0];
uint8_t address = packet[1];
uint16_t size = (packet[2] << 8) + packet[3];
uint16_t size = (packet[2] << 8) + packet[3];
if (size != packetLen - 6) {
//Invalid Length
return;
}
if (size != packetLen - 6) {
// Invalid Length
return;
}
switch (command) {
case ArduinoCookie::SPI: {
//ArduinoCookie **itsComplicated;
auto findIter = spiMap.find(address);
if (findIter == spiMap.end()) {
//we do no know this address
return;
}
ArduinoCookie& cookie = findIter->second;
if (packetLen > cookie.maxReplySize + 6) {
packetLen = cookie.maxReplySize + 6;
}
std::memcpy(cookie.replyBuffer.data(), packet + 4, packetLen - 6);
cookie.receivedDataLen = packetLen - 6;
}
break;
default:
return;
}
switch (command) {
case ArduinoCookie::SPI: {
// ArduinoCookie **itsComplicated;
auto findIter = spiMap.find(address);
if (findIter == spiMap.end()) {
// we do no know this address
return;
}
ArduinoCookie &cookie = findIter->second;
if (packetLen > cookie.maxReplySize + 6) {
packetLen = cookie.maxReplySize + 6;
}
std::memcpy(cookie.replyBuffer.data(), packet + 4, packetLen - 6);
cookie.receivedDataLen = packetLen - 6;
} 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>
@ -14,56 +14,53 @@
#include <windows.h>
#endif
//Forward declaration, so users don't peek
// Forward declaration, so users don't peek
class ArduinoCookie;
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;
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;
static const uint8_t COMMAND_INVALID = -1;
static const uint8_t COMMAND_SPI = 1;
static const uint8_t COMMAND_INVALID = -1;
static const uint8_t COMMAND_SPI = 1;
ArduinoComIF(object_id_t setObjectId, bool promptComIF = false,
const char *serialDevice = nullptr);
void setBaudrate(uint32_t baudRate);
ArduinoComIF(object_id_t setObjectId, bool promptComIF = false,
const char *serialDevice = nullptr);
void setBaudrate(uint32_t baudRate);
virtual ~ArduinoComIF();
virtual ~ArduinoComIF();
/** 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 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;
/** 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 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;
private:
private:
#ifdef LINUX
#elif WIN32
HANDLE hCom = INVALID_HANDLE_VALUE;
HANDLE hCom = INVALID_HANDLE_VALUE;
#endif
// remembering if the initialization in the ctor worked
// if not, all calls are disabled
bool initialized = false;
int serialPort = 0;
// Default baud rate is 9600 for now.
uint32_t baudRate = 9600;
// remembering if the initialization in the ctor worked
// if not, all calls are disabled
bool initialized = false;
int serialPort = 0;
// Default baud rate is 9600 for now.
uint32_t baudRate = 9600;
//used to know where to put the data if a reply is received
std::map<uint8_t, ArduinoCookie> spiMap;
// used to know where to put the data if a reply is received
std::map<uint8_t, ArduinoCookie> spiMap;
SimpleRingBuffer rxBuffer;
SimpleRingBuffer rxBuffer;
ReturnValue_t sendMessage(uint8_t command, uint8_t address,
const uint8_t *data, size_t dataLen);
void handleSerialPortRx();
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);
void handlePacket(uint8_t *packet, size_t packetLen);
};
#endif /* MISSION_ARDUINOCOMMINTERFACE_H_ */

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,26 +2,21 @@
#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
};
class ArduinoCookie : public CookieIF {
public:
enum Protocol_t : uint8_t { INVALID, SPI, I2C };
ArduinoCookie(Protocol_t protocol, uint8_t address,
const size_t maxReplySize);
Protocol_t protocol;
uint8_t command;
uint8_t address;
std::vector<uint8_t> replyBuffer;
size_t receivedDataLen = 0;
size_t maxReplySize;
ArduinoCookie(Protocol_t protocol, uint8_t address, const size_t maxReplySize);
Protocol_t protocol;
uint8_t command;
uint8_t address;
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,59 +0,0 @@
#ifndef FSFWCONFIG_DEVICES_GPIOIDS_H_
#define FSFWCONFIG_DEVICES_GPIOIDS_H_
#include <linux/gpio/GpioIF.h>
namespace gpioIds {
enum gpioId_t {
HEATER_0,
HEATER_1,
HEATER_2,
HEATER_3,
HEATER_4,
HEATER_5,
HEATER_6,
HEATER_7,
DEPLSA1,
DEPLSA2,
MGM_0_LIS3_CS,
MGM_1_RM3100_CS,
GYRO_0_ADIS_CS,
GYRO_1_L3G_CS,
GYRO_2_L3G_CS,
MGM_2_LIS3_CS,
MGM_3_RM3100_CS,
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,
SPI_MUX_BIT_1,
SPI_MUX_BIT_2,
SPI_MUX_BIT_3,
SPI_MUX_BIT_4,
SPI_MUX_BIT_5,
SPI_MUX_BIT_6
};
}
#endif /* FSFWCONFIG_DEVICES_GPIOIDS_H_ */

View File

@ -4,55 +4,54 @@
#include <OBSWConfig.h>
namespace pcduSwitches {
/* Switches are uint8_t datatype and go from 0 to 255 */
enum switcherList {
Q7S,
PAYLOAD_PCDU_CH1,
RW,
TCS_BOARD_8V_HEATER_IN,
SUS_REDUNDANT,
DEPLOYMENT_MECHANISM,
PAYLOAD_PCDU_CH6,
ACS_BOARD_SIDE_B,
PAYLOAD_CAMERA,
TCS_BOARD_3V3,
SYRLINKS,
STAR_TRACKER,
MGT,
SUS_NOMINAL,
SOLAR_CELL_EXP,
PLOC,
ACS_BORAD_SIDE_A,
NUMBER_OF_SWITCHES
};
/* Switches are uint8_t datatype and go from 0 to 255 */
enum SwitcherList {
Q7S,
PAYLOAD_PCDU_CH1,
RW,
TCS_BOARD_8V_HEATER_IN,
SUS_REDUNDANT,
DEPLOYMENT_MECHANISM,
PAYLOAD_PCDU_CH6,
ACS_BOARD_SIDE_B,
PAYLOAD_CAMERA,
TCS_BOARD_3V3,
SYRLINKS,
STAR_TRACKER,
MGT,
SUS_NOMINAL,
SOLAR_CELL_EXP,
PLOC,
ACS_BOARD_SIDE_A,
NUMBER_OF_SWITCHES
};
static const uint8_t ON = 1;
static const uint8_t OFF = 0;
static const uint8_t ON = 1;
static const uint8_t OFF = 0;
/* Output states after reboot of the PDUs */
static const uint8_t INIT_STATE_Q7S = ON;
static const uint8_t INIT_STATE_PAYLOAD_PCDU_CH1 = OFF;
static const uint8_t INIT_STATE_RW = OFF;
/* Output states after reboot of the PDUs */
static const uint8_t INIT_STATE_Q7S = ON;
static const uint8_t INIT_STATE_PAYLOAD_PCDU_CH1 = OFF;
static const uint8_t INIT_STATE_RW = OFF;
#if BOARD_TE0720 == 1
/* Because the TE0720 is not connected to the PCDU, this switch is always on */
static const uint8_t INIT_STATE_TCS_BOARD_8V_HEATER_IN = ON;
/* Because the TE0720 is not connected to the PCDU, this switch is always on */
static const uint8_t INIT_STATE_TCS_BOARD_8V_HEATER_IN = ON;
#else
static const uint8_t INIT_STATE_TCS_BOARD_8V_HEATER_IN = OFF;
static const uint8_t INIT_STATE_TCS_BOARD_8V_HEATER_IN = OFF;
#endif
static const uint8_t INIT_STATE_SUS_REDUNDANT = OFF;
static const uint8_t INIT_STATE_DEPLOYMENT_MECHANISM = OFF;
static const uint8_t INIT_STATE_PAYLOAD_PCDU_CH6 = OFF;
static const uint8_t INIT_STATE_ACS_BOARD_SIDE_B = OFF;
static const uint8_t INIT_STATE_PAYLOAD_CAMERA = OFF;
static const uint8_t INIT_STATE_TCS_BOARD_3V3 = OFF;
static const uint8_t INIT_STATE_SYRLINKS = OFF;
static const uint8_t INIT_STATE_STAR_TRACKER = OFF;
static const uint8_t INIT_STATE_MGT = OFF;
static const uint8_t INIT_STATE_SUS_NOMINAL = OFF;
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;
}
static const uint8_t INIT_STATE_SUS_REDUNDANT = OFF;
static const uint8_t INIT_STATE_DEPLOYMENT_MECHANISM = OFF;
static const uint8_t INIT_STATE_PAYLOAD_PCDU_CH6 = OFF;
static const uint8_t INIT_STATE_ACS_BOARD_SIDE_B = OFF;
static const uint8_t INIT_STATE_PAYLOAD_CAMERA = OFF;
static const uint8_t INIT_STATE_TCS_BOARD_3V3 = OFF;
static const uint8_t INIT_STATE_SYRLINKS = OFF;
static const uint8_t INIT_STATE_STAR_TRACKER = OFF;
static const uint8_t INIT_STATE_MGT = OFF;
static const uint8_t INIT_STATE_SUS_NOMINAL = OFF;
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

@ -89,176 +89,176 @@ const char *ACK_FAILURE_STRING = "ACK_FAILURE";
const char *EXE_FAILURE_STRING = "EXE_FAILURE";
const char *CRC_FAILURE_EVENT_STRING = "CRC_FAILURE_EVENT";
const char * translateEvents(Event event) {
switch( (event & 0xffff) ) {
case(2200):
return STORE_SEND_WRITE_FAILED_STRING;
case(2201):
return STORE_WRITE_FAILED_STRING;
case(2202):
return STORE_SEND_READ_FAILED_STRING;
case(2203):
return STORE_READ_FAILED_STRING;
case(2204):
return UNEXPECTED_MSG_STRING;
case(2205):
return STORING_FAILED_STRING;
case(2206):
return TM_DUMP_FAILED_STRING;
case(2207):
return STORE_INIT_FAILED_STRING;
case(2208):
return STORE_INIT_EMPTY_STRING;
case(2209):
return STORE_CONTENT_CORRUPTED_STRING;
case(2210):
return STORE_INITIALIZE_STRING;
case(2211):
return INIT_DONE_STRING;
case(2212):
return DUMP_FINISHED_STRING;
case(2213):
return DELETION_FINISHED_STRING;
case(2214):
return DELETION_FAILED_STRING;
case(2215):
return AUTO_CATALOGS_SENDING_FAILED_STRING;
case(2600):
return GET_DATA_FAILED_STRING;
case(2601):
return STORE_DATA_FAILED_STRING;
case(2800):
return DEVICE_BUILDING_COMMAND_FAILED_STRING;
case(2801):
return DEVICE_SENDING_COMMAND_FAILED_STRING;
case(2802):
return DEVICE_REQUESTING_REPLY_FAILED_STRING;
case(2803):
return DEVICE_READING_REPLY_FAILED_STRING;
case(2804):
return DEVICE_INTERPRETING_REPLY_FAILED_STRING;
case(2805):
return DEVICE_MISSED_REPLY_STRING;
case(2806):
return DEVICE_UNKNOWN_REPLY_STRING;
case(2807):
return DEVICE_UNREQUESTED_REPLY_STRING;
case(2808):
return INVALID_DEVICE_COMMAND_STRING;
case(2809):
return MONITORING_LIMIT_EXCEEDED_STRING;
case(2810):
return MONITORING_AMBIGUOUS_STRING;
case(4201):
return FUSE_CURRENT_HIGH_STRING;
case(4202):
return FUSE_WENT_OFF_STRING;
case(4204):
return POWER_ABOVE_HIGH_LIMIT_STRING;
case(4205):
return POWER_BELOW_LOW_LIMIT_STRING;
case(4300):
return SWITCH_WENT_OFF_STRING;
case(5000):
return HEATER_ON_STRING;
case(5001):
return HEATER_OFF_STRING;
case(5002):
return HEATER_TIMEOUT_STRING;
case(5003):
return HEATER_STAYED_ON_STRING;
case(5004):
return HEATER_STAYED_OFF_STRING;
case(5200):
return TEMP_SENSOR_HIGH_STRING;
case(5201):
return TEMP_SENSOR_LOW_STRING;
case(5202):
return TEMP_SENSOR_GRADIENT_STRING;
case(5901):
return COMPONENT_TEMP_LOW_STRING;
case(5902):
return COMPONENT_TEMP_HIGH_STRING;
case(5903):
return COMPONENT_TEMP_OOL_LOW_STRING;
case(5904):
return COMPONENT_TEMP_OOL_HIGH_STRING;
case(5905):
return TEMP_NOT_IN_OP_RANGE_STRING;
case(7101):
return FDIR_CHANGED_STATE_STRING;
case(7102):
return FDIR_STARTS_RECOVERY_STRING;
case(7103):
return FDIR_TURNS_OFF_DEVICE_STRING;
case(7201):
return MONITOR_CHANGED_STATE_STRING;
case(7202):
return VALUE_BELOW_LOW_LIMIT_STRING;
case(7203):
return VALUE_ABOVE_HIGH_LIMIT_STRING;
case(7204):
return VALUE_OUT_OF_RANGE_STRING;
case(7301):
return SWITCHING_TM_FAILED_STRING;
case(7400):
return CHANGING_MODE_STRING;
case(7401):
return MODE_INFO_STRING;
case(7402):
return FALLBACK_FAILED_STRING;
case(7403):
return MODE_TRANSITION_FAILED_STRING;
case(7404):
return CANT_KEEP_MODE_STRING;
case(7405):
return OBJECT_IN_INVALID_MODE_STRING;
case(7406):
return FORCING_MODE_STRING;
case(7407):
return MODE_CMD_REJECTED_STRING;
case(7506):
return HEALTH_INFO_STRING;
case(7507):
return CHILD_CHANGED_HEALTH_STRING;
case(7508):
return CHILD_PROBLEMS_STRING;
case(7509):
return OVERWRITING_HEALTH_STRING;
case(7510):
return TRYING_RECOVERY_STRING;
case(7511):
return RECOVERY_STEP_STRING;
case(7512):
return RECOVERY_DONE_STRING;
case(7900):
return RF_AVAILABLE_STRING;
case(7901):
return RF_LOST_STRING;
case(7902):
return BIT_LOCK_STRING;
case(7903):
return BIT_LOCK_LOST_STRING;
case(7905):
return FRAME_PROCESSING_FAILED_STRING;
case(8900):
return CLOCK_SET_STRING;
case(8901):
return CLOCK_SET_FAILURE_STRING;
case(9700):
return TEST_STRING;
case(10600):
return CHANGE_OF_SETUP_PARAMETER_STRING;
case(11101):
return MEMORY_READ_RPT_CRC_FAILURE_STRING;
case(11102):
return ACK_FAILURE_STRING;
case(11103):
return EXE_FAILURE_STRING;
case(11104):
return CRC_FAILURE_EVENT_STRING;
default:
return "UNKNOWN_EVENT";
}
return 0;
const char *translateEvents(Event event) {
switch ((event & 0xffff)) {
case (2200):
return STORE_SEND_WRITE_FAILED_STRING;
case (2201):
return STORE_WRITE_FAILED_STRING;
case (2202):
return STORE_SEND_READ_FAILED_STRING;
case (2203):
return STORE_READ_FAILED_STRING;
case (2204):
return UNEXPECTED_MSG_STRING;
case (2205):
return STORING_FAILED_STRING;
case (2206):
return TM_DUMP_FAILED_STRING;
case (2207):
return STORE_INIT_FAILED_STRING;
case (2208):
return STORE_INIT_EMPTY_STRING;
case (2209):
return STORE_CONTENT_CORRUPTED_STRING;
case (2210):
return STORE_INITIALIZE_STRING;
case (2211):
return INIT_DONE_STRING;
case (2212):
return DUMP_FINISHED_STRING;
case (2213):
return DELETION_FINISHED_STRING;
case (2214):
return DELETION_FAILED_STRING;
case (2215):
return AUTO_CATALOGS_SENDING_FAILED_STRING;
case (2600):
return GET_DATA_FAILED_STRING;
case (2601):
return STORE_DATA_FAILED_STRING;
case (2800):
return DEVICE_BUILDING_COMMAND_FAILED_STRING;
case (2801):
return DEVICE_SENDING_COMMAND_FAILED_STRING;
case (2802):
return DEVICE_REQUESTING_REPLY_FAILED_STRING;
case (2803):
return DEVICE_READING_REPLY_FAILED_STRING;
case (2804):
return DEVICE_INTERPRETING_REPLY_FAILED_STRING;
case (2805):
return DEVICE_MISSED_REPLY_STRING;
case (2806):
return DEVICE_UNKNOWN_REPLY_STRING;
case (2807):
return DEVICE_UNREQUESTED_REPLY_STRING;
case (2808):
return INVALID_DEVICE_COMMAND_STRING;
case (2809):
return MONITORING_LIMIT_EXCEEDED_STRING;
case (2810):
return MONITORING_AMBIGUOUS_STRING;
case (4201):
return FUSE_CURRENT_HIGH_STRING;
case (4202):
return FUSE_WENT_OFF_STRING;
case (4204):
return POWER_ABOVE_HIGH_LIMIT_STRING;
case (4205):
return POWER_BELOW_LOW_LIMIT_STRING;
case (4300):
return SWITCH_WENT_OFF_STRING;
case (5000):
return HEATER_ON_STRING;
case (5001):
return HEATER_OFF_STRING;
case (5002):
return HEATER_TIMEOUT_STRING;
case (5003):
return HEATER_STAYED_ON_STRING;
case (5004):
return HEATER_STAYED_OFF_STRING;
case (5200):
return TEMP_SENSOR_HIGH_STRING;
case (5201):
return TEMP_SENSOR_LOW_STRING;
case (5202):
return TEMP_SENSOR_GRADIENT_STRING;
case (5901):
return COMPONENT_TEMP_LOW_STRING;
case (5902):
return COMPONENT_TEMP_HIGH_STRING;
case (5903):
return COMPONENT_TEMP_OOL_LOW_STRING;
case (5904):
return COMPONENT_TEMP_OOL_HIGH_STRING;
case (5905):
return TEMP_NOT_IN_OP_RANGE_STRING;
case (7101):
return FDIR_CHANGED_STATE_STRING;
case (7102):
return FDIR_STARTS_RECOVERY_STRING;
case (7103):
return FDIR_TURNS_OFF_DEVICE_STRING;
case (7201):
return MONITOR_CHANGED_STATE_STRING;
case (7202):
return VALUE_BELOW_LOW_LIMIT_STRING;
case (7203):
return VALUE_ABOVE_HIGH_LIMIT_STRING;
case (7204):
return VALUE_OUT_OF_RANGE_STRING;
case (7301):
return SWITCHING_TM_FAILED_STRING;
case (7400):
return CHANGING_MODE_STRING;
case (7401):
return MODE_INFO_STRING;
case (7402):
return FALLBACK_FAILED_STRING;
case (7403):
return MODE_TRANSITION_FAILED_STRING;
case (7404):
return CANT_KEEP_MODE_STRING;
case (7405):
return OBJECT_IN_INVALID_MODE_STRING;
case (7406):
return FORCING_MODE_STRING;
case (7407):
return MODE_CMD_REJECTED_STRING;
case (7506):
return HEALTH_INFO_STRING;
case (7507):
return CHILD_CHANGED_HEALTH_STRING;
case (7508):
return CHILD_PROBLEMS_STRING;
case (7509):
return OVERWRITING_HEALTH_STRING;
case (7510):
return TRYING_RECOVERY_STRING;
case (7511):
return RECOVERY_STEP_STRING;
case (7512):
return RECOVERY_DONE_STRING;
case (7900):
return RF_AVAILABLE_STRING;
case (7901):
return RF_LOST_STRING;
case (7902):
return BIT_LOCK_STRING;
case (7903):
return BIT_LOCK_LOST_STRING;
case (7905):
return FRAME_PROCESSING_FAILED_STRING;
case (8900):
return CLOCK_SET_STRING;
case (8901):
return CLOCK_SET_FAILURE_STRING;
case (9700):
return TEST_STRING;
case (10600):
return CHANGE_OF_SETUP_PARAMETER_STRING;
case (11101):
return MEMORY_READ_RPT_CRC_FAILURE_STRING;
case (11102):
return ACK_FAILURE_STRING;
case (11103):
return EXE_FAILURE_STRING;
case (11104):
return CRC_FAILURE_EVENT_STRING;
default:
return "UNKNOWN_EVENT";
}
return 0;
}

View File

@ -3,6 +3,6 @@
#include <fsfw/events/Event.h>
const char * translateEvents(Event event);
const char* translateEvents(Event event);
#endif /* FSFWCONFIG_EVENTS_TRANSLATEEVENTS_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,11 +1,10 @@
#include "MissionMessageTypes.h"
#include <fsfw/ipc/CommandMessage.h>
void messagetypes::clearMissionMessage(CommandMessage* message) {
switch(message->getMessageType()) {
default:
break;
}
switch (message->getMessageType()) {
default:
break;
}
}

View File

@ -13,10 +13,10 @@ class CommandMessage;
*/
namespace messagetypes {
enum MESSAGE_TYPE {
MISSION_MESSAGE_TYPE_START = FW_MESSAGES_COUNT,
MISSION_MESSAGE_TYPE_START = FW_MESSAGES_COUNT,
};
void clearMissionMessage(CommandMessage* message);
}
} // namespace messagetypes
#endif /* CONFIG_IPC_MISSIONMESSAGETYPES_H_ */

View File

@ -1,31 +1,32 @@
#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 {
enum sourceObjects : uint32_t {
PUS_SERVICE_3 = 0x51000300,
PUS_SERVICE_5 = 0x51000400,
PUS_SERVICE_6 = 0x51000500,
PUS_SERVICE_8 = 0x51000800,
PUS_SERVICE_23 = 0x51002300,
PUS_SERVICE_201 = 0x51020100,
PUS_SERVICE_3 = 0x51000300,
PUS_SERVICE_5 = 0x51000400,
PUS_SERVICE_6 = 0x51000500,
PUS_SERVICE_8 = 0x51000800,
PUS_SERVICE_23 = 0x51002300,
PUS_SERVICE_201 = 0x51020100,
TM_FUNNEL = 0x52000002,
TM_FUNNEL = 0x52000002,
/* Test Task */
/* Test Task */
TEST_TASK = 0x42694269,
DUMMY_INTERFACE = 0xCAFECAFE,
DUMMY_HANDLER = 0x4400AFFE,
TEST_TASK = 0x42694269,
DUMMY_INTERFACE = 0xCAFECAFE,
DUMMY_HANDLER = 0x4400AFFE,
/* 0x49 ('I') for Communication Interfaces **/
ARDUINO_COM_IF = 0x49000001
};
/* 0x49 ('I') for Communication Interfaces **/
ARDUINO_COM_IF = 0x49000001
};
}
#endif /* BSP_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_ */

View File

@ -1,4 +1,4 @@
/**
/**
* @brief Auto-generated object translation file.
* @details
* Contains 31 translations.
@ -38,72 +38,72 @@ const char *FSFW_OBJECTS_END_STRING = "FSFW_OBJECTS_END";
const char *DUMMY_INTERFACE_STRING = "DUMMY_INTERFACE";
const char *NO_OBJECT_STRING = "NO_OBJECT";
const char* translateObject(object_id_t object) {
switch( (object & 0xFFFFFFFF) ) {
case 0x42694269:
return TEST_TASK_STRING;
case 0x4400AFFE:
return DUMMY_HANDLER_STRING;
case 0x49000001:
return ARDUINO_COM_IF_STRING;
case 0x51000300:
return PUS_SERVICE_3_STRING;
case 0x51000400:
return PUS_SERVICE_5_STRING;
case 0x51000500:
return PUS_SERVICE_6_STRING;
case 0x51000800:
return PUS_SERVICE_8_STRING;
case 0x51002300:
return PUS_SERVICE_23_STRING;
case 0x51020100:
return PUS_SERVICE_201_STRING;
case 0x52000002:
return TM_FUNNEL_STRING;
case 0x53000000:
return FSFW_OBJECTS_START_STRING;
case 0x53000001:
return PUS_SERVICE_1_VERIFICATION_STRING;
case 0x53000002:
return PUS_SERVICE_2_DEVICE_ACCESS_STRING;
case 0x53000003:
return PUS_SERVICE_3_HOUSEKEEPING_STRING;
case 0x53000005:
return PUS_SERVICE_5_EVENT_REPORTING_STRING;
case 0x53000008:
return PUS_SERVICE_8_FUNCTION_MGMT_STRING;
case 0x53000009:
return PUS_SERVICE_9_TIME_MGMT_STRING;
case 0x53000017:
return PUS_SERVICE_17_TEST_STRING;
case 0x53000020:
return PUS_SERVICE_20_PARAMETERS_STRING;
case 0x53000200:
return PUS_SERVICE_200_MODE_MGMT_STRING;
case 0x53010000:
return HEALTH_TABLE_STRING;
case 0x53010100:
return MODE_STORE_STRING;
case 0x53030000:
return EVENT_MANAGER_STRING;
case 0x53040000:
return INTERNAL_ERROR_REPORTER_STRING;
case 0x534f0100:
return TC_STORE_STRING;
case 0x534f0200:
return TM_STORE_STRING;
case 0x534f0300:
return IPC_STORE_STRING;
case 0x53500010:
return TIME_STAMPER_STRING;
case 0x53ffffff:
return FSFW_OBJECTS_END_STRING;
case 0xCAFECAFE:
return DUMMY_INTERFACE_STRING;
case 0xFFFFFFFF:
return NO_OBJECT_STRING;
default:
return "UNKNOWN_OBJECT";
}
return 0;
const char *translateObject(object_id_t object) {
switch ((object & 0xFFFFFFFF)) {
case 0x42694269:
return TEST_TASK_STRING;
case 0x4400AFFE:
return DUMMY_HANDLER_STRING;
case 0x49000001:
return ARDUINO_COM_IF_STRING;
case 0x51000300:
return PUS_SERVICE_3_STRING;
case 0x51000400:
return PUS_SERVICE_5_STRING;
case 0x51000500:
return PUS_SERVICE_6_STRING;
case 0x51000800:
return PUS_SERVICE_8_STRING;
case 0x51002300:
return PUS_SERVICE_23_STRING;
case 0x51020100:
return PUS_SERVICE_201_STRING;
case 0x52000002:
return TM_FUNNEL_STRING;
case 0x53000000:
return FSFW_OBJECTS_START_STRING;
case 0x53000001:
return PUS_SERVICE_1_VERIFICATION_STRING;
case 0x53000002:
return PUS_SERVICE_2_DEVICE_ACCESS_STRING;
case 0x53000003:
return PUS_SERVICE_3_HOUSEKEEPING_STRING;
case 0x53000005:
return PUS_SERVICE_5_EVENT_REPORTING_STRING;
case 0x53000008:
return PUS_SERVICE_8_FUNCTION_MGMT_STRING;
case 0x53000009:
return PUS_SERVICE_9_TIME_MGMT_STRING;
case 0x53000017:
return PUS_SERVICE_17_TEST_STRING;
case 0x53000020:
return PUS_SERVICE_20_PARAMETERS_STRING;
case 0x53000200:
return PUS_SERVICE_200_MODE_MGMT_STRING;
case 0x53010000:
return HEALTH_TABLE_STRING;
case 0x53010100:
return MODE_STORE_STRING;
case 0x53030000:
return EVENT_MANAGER_STRING;
case 0x53040000:
return INTERNAL_ERROR_REPORTER_STRING;
case 0x534f0100:
return TC_STORE_STRING;
case 0x534f0200:
return TM_STORE_STRING;
case 0x534f0300:
return IPC_STORE_STRING;
case 0x53500010:
return TIME_STAMPER_STRING;
case 0x53ffffff:
return FSFW_OBJECTS_END_STRING;
case 0xCAFECAFE:
return DUMMY_INTERFACE_STRING;
case 0xFFFFFFFF:
return NO_OBJECT_STRING;
default:
return "UNKNOWN_OBJECT";
}
return 0;
}

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
@ -11,9 +12,8 @@
*/
namespace CLASS_ID {
enum {
CLASS_ID_START = COMMON_CLASS_ID_END,
CLASS_ID_START = COMMON_CLASS_ID_END,
};
}
#endif /* CONFIG_RETURNVALUES_CLASSIDS_H_ */

View File

@ -12,8 +12,7 @@
* APID is a 11 bit number
*/
namespace apid {
static const uint16_t EIVE_OBSW = 0x65;
static const uint16_t EIVE_OBSW = 0x65;
}
#endif /* FSFWCONFIG_TMTC_APID_H_ */

View File

@ -2,21 +2,21 @@
#define CONFIG_TMTC_PUSIDS_HPP_
namespace pus {
enum Ids{
PUS_SERVICE_1 = 1,
PUS_SERVICE_2 = 2,
PUS_SERVICE_3 = 3,
PUS_SERVICE_3_PSB = 3,
PUS_SERVICE_5 = 5,
PUS_SERVICE_6 = 6,
PUS_SERVICE_8 = 8,
PUS_SERVICE_9 = 9,
PUS_SERVICE_17 = 17,
PUS_SERVICE_19 = 19,
PUS_SERVICE_20 = 20,
PUS_SERVICE_23 = 23,
PUS_SERVICE_200 = 200,
PUS_SERVICE_201 = 201,
enum Ids {
PUS_SERVICE_1 = 1,
PUS_SERVICE_2 = 2,
PUS_SERVICE_3 = 3,
PUS_SERVICE_3_PSB = 3,
PUS_SERVICE_5 = 5,
PUS_SERVICE_6 = 6,
PUS_SERVICE_8 = 8,
PUS_SERVICE_9 = 9,
PUS_SERVICE_17 = 17,
PUS_SERVICE_19 = 19,
PUS_SERVICE_20 = 20,
PUS_SERVICE_23 = 23,
PUS_SERVICE_200 = 200,
PUS_SERVICE_201 = 201,
};
};

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,21 +16,18 @@ static const char* COMPILE_PRINTOUT = "unknown OS";
* Linux and Windows.
* @return
*/
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 << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl;
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 << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl;
initmission::initMission();
initmission::initMission();
for(;;) {
// suspend main thread by sleeping it.
TaskFactory::delayTask(5000);
}
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,192 +1,245 @@
#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");
ServiceInterfaceStream sif::error("ERROR");
ObjectManagerIF *objectManager = nullptr;
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);
sif::info << "Initializing all objects.." << std::endl;
ObjectManager::instance()->initialize();
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();
/* This function creates and starts all tasks */
initTasks();
}
void initmission::initTasks() {
TaskFactory* factory = TaskFactory::instance();
if(factory == nullptr) {
/* Should never happen ! */
return;
}
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;
void (*missedDeadlineFunc)(void) = TaskFactory::printMissedDeadline;
#else
void (*missedDeadlineFunc) (void) = nullptr;
void (*missedDeadlineFunc)(void) = nullptr;
#endif
/* TMTC Distribution */
PeriodicTaskIF* tmTcDistributor = factory->createPeriodicTask(
"DIST", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
ReturnValue_t 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;
}
/* 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;
}
/* UDP bridge */
PeriodicTaskIF* udpBridgeTask = factory->createPeriodicTask(
"UDP_UNIX_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
result = udpBridgeTask->addComponent(objects::TMTC_BRIDGE);
if(result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "Add component UDP Unix 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);
if(result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "Add component UDP Polling failed" << std::endl;
}
/* UDP 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 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 */
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;
}
/* PUS Services */
std::vector<PeriodicTaskIF*> pusTasks;
createPusTasks(*factory, missedDeadlineFunc, pusTasks);
PeriodicTaskIF* pusEvents = factory->createPeriodicTask(
"PUS_EVENTS", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
result = pusVerification->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
if(result != HasReturnvaluesIF::RETURN_OK){
initmission::printAddObjectError("PUS5", objects::PUS_SERVICE_5_EVENT_REPORTING);
}
std::vector<PeriodicTaskIF*> pstTasks;
createPstTasks(*factory, missedDeadlineFunc, pstTasks);
#if OBSW_ADD_TEST_CODE == 1
std::vector<PeriodicTaskIF*> testTasks;
createTestTasks(*factory, missedDeadlineFunc, pstTasks);
#endif /* OBSW_ADD_TEST_CODE == 1 */
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);
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;
}
}
};
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);
}
sif::info << "Starting tasks.." << std::endl;
tmTcDistributor->startTask();
tmtcBridgeTask->startTask();
tmtcPollingTask->startTask();
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);
}
taskStarter(pusTasks, "PUS Tasks");
#if OBSW_ADD_TEST_CODE == 1
taskStarter(testTasks, "Test Tasks");
#endif /* OBSW_ADD_TEST_CODE == 1 */
taskStarter(pstTasks, "PST Tasks");
#if OBSW_ADD_TEST_PST == 1
FixedTimeslotTaskIF* pstTestTask = factory->createFixedTimeslotTask("ACS_PST", 50,
PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 2.0, missedDeadlineFunc);
result = pst::pstTest(pstTestTask);
if(result != HasReturnvaluesIF::RETURN_OK) {
sif::warning << "initmission::initTasks: ACS PST initialization failed!" << std::endl;
}
if (startTestPst) {
pstTestTask->startTask();
}
#endif /* RPI_TEST_ACS_BOARD == 1 */
sif::info << "Tasks started.." << std::endl;
}
PeriodicTaskIF* testTask = factory->createPeriodicTask(
"TEST_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
#if OBSW_ADD_TEST_CODE == 1
result = testTask->addComponent(objects::TEST_TASK);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("TEST_TASK", objects::TEST_TASK);
}
#endif /* OBSW_ADD_TEST_CODE == 1 */
#if RPI_ADD_SPI_TEST == 1
result = testTask->addComponent(objects::SPI_TEST);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("SPI_TEST", objects::SPI_TEST);
}
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);
}
void initmission::createPstTasks(TaskFactory& factory,
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);
result = pst::pstSpi(spiPst);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl;
}
taskVec.push_back(spiPst);
#endif
}
void initmission::createTestTasks(TaskFactory& factory,
TaskDeadlineMissedFunction missedDeadlineFunc,
std::vector<PeriodicTaskIF*>& taskVec) {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
PeriodicTaskIF* testTask = factory.createPeriodicTask(
"TEST_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
result = testTask->addComponent(objects::TEST_TASK);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("TEST_TASK", objects::TEST_TASK);
}
#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);
}
#endif /* RPI_ADD_SPI_TEST == 1 */
#if RPI_ADD_GPIO_TEST == 1
result = testTask->addComponent(objects::LIBGPIOD_TEST);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("GPIOD_TEST", objects::LIBGPIOD_TEST);
}
result = testTask->addComponent(objects::LIBGPIOD_TEST);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("GPIOD_TEST", objects::LIBGPIOD_TEST);
}
#endif /* RPI_ADD_GPIO_TEST == 1 */
#if RPI_ADD_UART_TEST == 1
result = testTask->addComponent(objects::UART_TEST);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("UART_TEST", objects::UART_TEST);
}
#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);
sif::info << "Starting tasks.." << std::endl;
tmTcDistributor->startTask();
udpBridgeTask->startTask();
udpPollingTask->startTask();
pusVerification->startTask();
pusEvents->startTask();
pusHighPrio->startTask();
pusMedPrio->startTask();
pusLowPrio->startTask();
#if OBSW_ADD_TEST_CODE == 1
testTask->startTask();
#endif /* OBSW_ADD_TEST_CODE == 1 */
bool startTestPst = true;
static_cast<void>(startTestPst);
#if OBSW_ADD_TEST_PST == 1
pstTestTask->startTask();
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 */
sif::info << "Tasks started.." << std::endl;
}

View File

@ -1,9 +1,23 @@
#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 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,165 +1,230 @@
#include <fsfw_hal/linux/uart/UartComIF.h>
#include <fsfw_hal/linux/uart/UartCookie.h>
#include <mission/devices/GPSHyperionHandler.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 "spiConf.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/MGMHandlerLIS3MDL.h"
#include "mission/devices/MGMHandlerRM3100.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 */
#include "fsfw/osal/common/UdpTmTcBridge.h"
#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/UdpTcPollingTask.h"
#include "fsfw/osal/common/UdpTmTcBridge.h"
#endif
#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/common/gpio/GpioCookie.h"
#include "fsfw_hal/linux/spi/SpiCookie.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;
PusServiceBase::packetSource = objects::PUS_PACKET_DISTRIBUTOR;
PusServiceBase::packetDestination = objects::TM_FUNNEL;
CommandingServiceBase::defaultPacketSource = objects::PUS_PACKET_DISTRIBUTOR;
CommandingServiceBase::defaultPacketDestination = objects::TM_FUNNEL;
CommandingServiceBase::defaultPacketSource = objects::PUS_PACKET_DISTRIBUTOR;
CommandingServiceBase::defaultPacketDestination = objects::TM_FUNNEL;
TmFunnel::downlinkDestination = objects::TMTC_BRIDGE;
// No storage object for now.
TmFunnel::storageDestination = objects::NO_OBJECT;
TmFunnel::downlinkDestination = objects::TMTC_BRIDGE;
// No storage object for now.
TmFunnel::storageDestination = objects::NO_OBJECT;
VerificationReporter::messageReceiver = objects::PUS_SERVICE_1_VERIFICATION;
TmPacketBase::timeStamperId = objects::TIME_STAMPER;
VerificationReporter::messageReceiver = objects::PUS_SERVICE_1_VERIFICATION;
TmPacketBase::timeStamperId = objects::TIME_STAMPER;
}
void ObjectFactory::produce(void* args) {
Factory::setStaticFrameworkObjectIds();
ObjectFactory::produceGenericObjects();
GpioIF* gpioIF = new LinuxLibgpioIF(objects::GPIO_IF);
GpioCookie* gpioCookie = nullptr;
static_cast<void>(gpioCookie);
void ObjectFactory::produce(void* args){
Factory::setStaticFrameworkObjectIds();
ObjectFactory::produceGenericObjects();
new SpiComIF(objects::SPI_COM_IF, gpioIF);
new UdpTmTcBridge(objects::TMTC_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR);
new UdpTcPollingTask(objects::TMTC_POLLING_TASK, objects::TMTC_BRIDGE);
std::string spiDev;
SpiCookie* spiCookie = nullptr;
static_cast<void>(spiCookie);
GpioIF* gpioIF = new LinuxLibgpioIF(objects::GPIO_IF);
GpioCookie* gpioCookie = nullptr;
static_cast<void>(gpioCookie);
#if RPI_ADD_SPI_TEST == 1
new SpiTestClass(objects::SPI_TEST, gpioIF);
#if OBSW_ADD_ACS_BOARD == 1
if (gpioCookie == nullptr) {
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_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_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_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);
gpioIF->addGpios(gpioCookie);
spiDev = "/dev/spidev0.1";
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);
mgmLis3Handler->setStartUpImmediately();
#if FSFW_HAL_LIS3MDL_MGM_DEBUG == 1
mgmLis3Handler->setToGoToNormalMode(true);
#endif
#if RPI_ADD_UART_TEST == 1
new UartTestClass(objects::UART_TEST);
#else
new UartComIF(objects::UART_COM_IF);
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);
mgmRm3100Handler->setStartUpImmediately();
#if FSFW_HAL_RM3100_MGM_DEBUG == 1
mgmRm3100Handler->setToGoToNormalMode(true);
#endif
#if RPI_LOOPBACK_TEST_GPIO == 1
GpioCookie* gpioCookieLoopback = new GpioCookie();
/* Loopback pins. Adapt according to setup */
gpioId_t gpioIdSender = gpioIds::TEST_ID_0;
int bcmPinSender = 26;
gpioId_t gpioIdReader = gpioIds::TEST_ID_1;
int bcmPinReader = 16;
gpio::createRpiGpioConfig(gpioCookieLoopback, gpioIdSender, bcmPinSender, "GPIO_LB_SENDER",
gpio::Direction::OUT, 0);
gpio::createRpiGpioConfig(gpioCookieLoopback, gpioIdReader, bcmPinReader, "GPIO_LB_READER",
gpio::Direction::IN, 0);
new LibgpiodTest(objects::LIBGPIOD_TEST, objects::GPIO_IF, gpioCookieLoopback);
#endif /* RPI_LOOPBACK_TEST_GPIO == 1 */
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->setStartUpImmediately();
#if FSFW_HAL_LIS3MDL_MGM_DEBUG == 1
mgmLis3Handler->setToGoToNormalMode(true);
#endif
new SpiComIF(objects::SPI_COM_IF, gpioIF);
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->setStartUpImmediately();
#if FSFW_HAL_RM3100_MGM_DEBUG == 1
mgmRm3100Handler->setToGoToNormalMode(true);
#endif
std::string spiDev;
SpiCookie* spiCookie = nullptr;
static_cast<void>(spiCookie);
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);
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);
gyroL3gHandler->setStartUpImmediately();
#if FSFW_HAL_L3GD20_GYRO_DEBUG == 1
gyroL3gHandler->setToGoToNormalMode(true);
#endif
#if RPI_TEST_ACS_BOARD == 1
if(gpioCookie == nullptr) {
gpioCookie = new GpioCookie();
}
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_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_2_L3G_CS, gpio::GYRO_2_BCM_PIN,
"GYRO_2_L3G", gpio::Direction::OUT, 1);
gpioIF->addGpios(gpioCookie);
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->setStartUpImmediately();
spiDev = "/dev/spidev0.0";
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 MGMHandlerLIS3MDL(objects::MGM_0_LIS3_HANDLER,
objects::SPI_COM_IF, spiCookie);
mgmLis3Handler->setStartUpImmediately();
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 MGMHandlerRM3100(objects::MGM_1_RM3100_HANDLER,
objects::SPI_COM_IF, spiCookie);
mgmRm3100Handler->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);
gyroL3gHandler->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);
gyroL3gHandler->setStartUpImmediately();
#if FSFW_HAL_L3GD20_GYRO_DEBUG == 1
gyroL3gHandler->setToGoToNormalMode(true);
#endif
#endif /* RPI_TEST_ACS_BOARD == 1 */
#if RPI_TEST_ADIS16507 == 1
if(gpioCookie == nullptr) {
gpioCookie = new GpioCookie();
}
gpio::createRpiGpioConfig(gpioCookie, gpioIds::GYRO_0_ADIS_CS, gpio::GYRO_0_BCM_PIN,
"GYRO_0_ADIS", gpio::Direction::OUT, 1);
gpioIF->addGpios(gpioCookie);
#if OBSW_ADD_TEST_CODE == 1
createTestTasks();
#endif /* OBSW_ADD_TEST_CODE == 1 */
}
spiDev = "/dev/spidev0.0";
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);
adisGyroHandler->setStartUpImmediately();
void ObjectFactory::createTestTasks() {
new TestTask(objects::TEST_TASK);
#if OBSW_ADD_SPI_TEST_CODE == 1
new SpiTestClass(objects::SPI_TEST, gpioIF);
#endif
#if OBSW_ADD_UART_TEST_CODE == 1
new UartTestClass(objects::UART_TEST);
#else
new UartComIF(objects::UART_COM_IF);
#endif
#if RPI_LOOPBACK_TEST_GPIO == 1
GpioCookie* gpioCookieLoopback = new GpioCookie();
/* Loopback pins. Adapt according to setup */
gpioId_t gpioIdSender = gpioIds::TEST_ID_0;
int bcmPinSender = 26;
gpioId_t gpioIdReader = gpioIds::TEST_ID_1;
int bcmPinReader = 16;
gpio::createRpiGpioConfig(gpioCookieLoopback, gpioIdSender, bcmPinSender, "GPIO_LB_SENDER",
gpio::Direction::OUT, 0);
gpio::createRpiGpioConfig(gpioCookieLoopback, gpioIdReader, bcmPinReader, "GPIO_LB_READER",
gpio::Direction::IN, 0);
new LibgpiodTest(objects::LIBGPIOD_TEST, objects::GPIO_IF, gpioCookieLoopback);
#endif /* RPI_LOOPBACK_TEST_GPIO == 1 */
#if RPI_TEST_ADIS16507 == 1
if (gpioCookie == nullptr) {
gpioCookie = new GpioCookie();
}
gpio::createRpiGpioConfig(gpioCookie, gpioIds::GYRO_0_ADIS_CS, gpio::GYRO_0_BCM_PIN,
"GYRO_0_ADIS", gpio::Direction::OUT, 1);
gpioIF->addGpios(gpioCookie);
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);
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->setToFlushInput(true);
uartCookie->setReadCycles(6);
GPSHyperionHandler* gpsHandler = new GPSHyperionHandler(objects::GPS0_HANDLER,
objects::UART_COM_IF, uartCookie);
gpsHandler->setStartUpImmediately();
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);
gpsHandler->setStartUpImmediately();
#endif
}

View File

@ -1,10 +1,11 @@
#ifndef BSP_LINUX_OBJECTFACTORY_H_
#define BSP_LINUX_OBJECTFACTORY_H_
namespace ObjectFactory {
void setStatics();
void produce(void* args);
};
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

@ -32,7 +32,7 @@ SOFTWARE.
#define ETL_CHECK_PUSH_POP
#define ETL_CPP11_SUPPORTED 1
#define ETL_NO_NULLPTR_SUPPORT 0
#define ETL_CPP11_SUPPORTED 1
#define ETL_NO_NULLPTR_SUPPORT 0
#endif

View File

@ -6,8 +6,9 @@
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;
sif::info << "GCC GCOV: Please supply GCOV=1 in Makefile if "
"coverage information is desired.\n"
<< std::flush;
}
#endif

View File

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

View File

@ -15,20 +15,18 @@
#define RPI_TEST_ACS_BOARD 0
#endif
#define RPI_ADD_UART_TEST 1
#if RPI_ADD_UART_TEST == 1
#define RPI_TEST_GPS_DEVICE 0
#endif
#define RPI_ADD_UART_TEST 0
/* Adapt these values accordingly */
namespace gpio {
static constexpr uint8_t MGM_0_BCM_PIN = 0;
static constexpr uint8_t MGM_1_BCM_PIN = 1;
static constexpr uint8_t MGM_2_BCM_PIN = 17;
static constexpr uint8_t MGM_3_BCM_PIN = 27;
static constexpr uint8_t MGM_0_BCM_PIN = 17;
static constexpr uint8_t MGM_1_BCM_PIN = 27;
static constexpr uint8_t MGM_2_BCM_PIN = 22;
static constexpr uint8_t MGM_3_BCM_PIN = 23;
static constexpr uint8_t GYRO_0_BCM_PIN = 5;
static constexpr uint8_t GYRO_1_BCM_PIN = 6;
static constexpr uint8_t GYRO_2_BCM_PIN = 4;
static constexpr uint8_t GYRO_2_BCM_PIN = 13;
static constexpr uint8_t GYRO_3_BCM_PIN = 19;
}
#endif /* BSP_RPI_BOARDCONFIG_RPI_CONFIG_H_ */

View File

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

View File

@ -1,11 +1,11 @@
#include "InitMission.h"
#include "OBSWVersion.h"
#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)
@ -18,21 +18,18 @@ 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)
{
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 << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl;
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 << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl;
initmission::initMission();
initmission::initMission();
for(;;) {
/* Suspend main thread by sleeping it. */
TaskFactory::delayTask(5000);
}
for (;;) {
/* Suspend main thread by sleeping it. */
TaskFactory::delayTask(5000);
}
}

View File

@ -1,16 +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(spiCallbacks)
endif()
add_subdirectory(boardconfig)
add_subdirectory(comIF)
add_subdirectory(core)
add_subdirectory(memory)
add_subdirectory(callbacks)
add_subdirectory(devices)

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

@ -0,0 +1,100 @@
#ifndef BSP_Q7S_BOARDCONFIG_BUSCONF_H_
#define BSP_Q7S_BOARDCONFIG_BUSCONF_H_
namespace q7s {
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-eive";
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 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;
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
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 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 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";
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";
} // namespace gpioNames
} // namespace q7s
#endif /* BSP_Q7S_BOARDCONFIG_BUSCONF_H_ */

View File

@ -32,7 +32,7 @@ SOFTWARE.
#define ETL_CHECK_PUSH_POP
#define ETL_CPP11_SUPPORTED 1
#define ETL_NO_NULLPTR_SUPPORT 0
#define ETL_CPP11_SUPPORTED 1
#define ETL_NO_NULLPTR_SUPPORT 0
#endif

View File

@ -6,8 +6,9 @@
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;
sif::info << "GCC GCOV: Please supply GCOV=1 in Makefile if "
"coverage information is desired.\n"
<< std::flush;
}
#endif

View File

@ -2,13 +2,9 @@
#include <stdio.h>
void printChar(const char* character, bool errStream) {
if(errStream) {
putc(*character, stderr);
return;
}
putc(*character, stdout);
if (errStream) {
putc(*character, stderr);
return;
}
putc(*character, stdout);
}

View File

@ -3,33 +3,36 @@
#include <cstdint>
#cmakedefine01 Q7S_SIMPLE_MODE
/*******************************************************************/
/** All of the following flags should be enabled for mission code */
/*******************************************************************/
#define Q7S_SD_NONE 0
#define Q7S_SD_COLD_REDUNDANT 1
#define Q7S_SD_HOT_REDUNDANT 2
//! Timers can mess up the code when debugging
//! All of this should be enabled for mission code!
/*******************************************************************/
/** Other flags */
/*******************************************************************/
#define Q7S_SD_NONE 0
#define Q7S_SD_COLD_REDUNDANT 1
#define Q7S_SD_HOT_REDUNDANT 2
// The OBSW will perform different actions to set up the SD cards depending on the flag set here
// Set to Q7S_SD_NONE: Don't do anything
// Set to Q7S_COLD_REDUNDANT: On startup, get the prefered SD card, turn it on and mount it, and
// turn off the second SD card if it is on
// Set to Q7S_HOT_REDUNDANT: On startup, turn on both SD cards and mount them
#define Q7S_SD_CARD_CONFIG Q7S_SD_COLD_REDUNDANT
#define Q7S_SD_CARD_CONFIG Q7S_SD_COLD_REDUNDANT
// Probably better if this is disabled for mission code. Convenient for development
#define Q7S_CHECK_FOR_ALREADY_RUNNING_IMG 1
#define Q7S_ADD_RTD_DEVICES 0
#define Q7S_CHECK_FOR_ALREADY_RUNNING_IMG 1
/* Only one of those 2 should be enabled! */
/* Add code for ACS board */
#define OBSW_ADD_ACS_BOARD 0
#if OBSW_ADD_ACS_BOARD == 0
#define Q7S_ADD_SPI_TEST 0
#define Q7S_SIMPLE_ADD_FILE_SYSTEM_TEST 0
#ifndef Q7S_SIMPLE_MODE
#define Q7S_SIMPLE_MODE 0
#endif
#define Q7S_ADD_SYRLINKS_HANDLER 1
#define Q7S_SIMPLE_ADD_FILE_SYSTEM_TEST 0
namespace config {
static const uint32_t SD_CARD_ACCESS_MUTEX_TIMEOUT = 50;

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,26 +1,23 @@
#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;
SdCard sdCard = SdCard::SDC0;
cout << "SD Card Test for SD card " << static_cast<int>(sdCard) << std::endl;
//Stopwatch stopwatch;
std::system("q7hw sd info all > /tmp/sd_status.txt");
//stopwatch.stop(true);
std::system("q7hw sd set 0 on > /tmp/sd_set.txt");
//stopwatch.stop(true);
std::system("q7hw sd set 0 off > /tmp/sd_set.txt");
//stopwatch.stop(true);
using namespace std;
SdCard sdCard = SdCard::SDC0;
cout << "SD Card Test for SD card " << static_cast<int>(sdCard) << std::endl;
// Stopwatch stopwatch;
std::system("q7hw sd info all > /tmp/sd_status.txt");
// stopwatch.stop(true);
std::system("q7hw sd set 0 on > /tmp/sd_set.txt");
// stopwatch.stop(true);
std::system("q7hw sd set 0 off > /tmp/sd_set.txt");
// stopwatch.stop(true);
}
FileSystemTest::~FileSystemTest() {
}
FileSystemTest::~FileSystemTest() {}

View File

@ -2,12 +2,11 @@
#define BSP_Q7S_BOARDTEST_FILESYSTEMTEST_H_
class FileSystemTest {
public:
FileSystemTest();
virtual~ FileSystemTest();
private:
public:
FileSystemTest();
virtual ~FileSystemTest();
private:
};
#endif /* BSP_Q7S_BOARDTEST_FILESYSTEMTEST_H_ */

View File

@ -1,254 +1,397 @@
#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) {
Q7STestTask::Q7STestTask(object_id_t objectId) : TestTask(objectId) {
doTestSdCard = false;
doTestScratchApi = false;
doTestGps = false;
}
ReturnValue_t Q7STestTask::performOneShotAction() {
//testSdCard();
//testScratchApi();
//testJsonLibDirect();
//testDummyParams();
//FsOpCodes opCode = FsOpCodes::ATTEMPT_DIR_REMOVAL_NON_EMPTY;
//testFileSystemHandlerDirect(opCode);
return TestTask::performOneShotAction();
if (doTestSdCard) {
testSdCard();
}
if (doTestScratchApi) {
testScratchApi();
}
// testJsonLibDirect();
// testDummyParams();
// testProtHandler();
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;
int result = std::system("q7hw sd info all > /tmp/sd_status.txt");
if(result != 0) {
sif::debug << "system call failed with " << result << endl;
using namespace std;
Stopwatch stopwatch;
int result = std::system("q7hw sd info all > /tmp/sd_status.txt");
if (result != 0) {
sif::debug << "system call failed with " << result << endl;
}
ifstream sdStatus("/tmp/sd_status.txt");
string line;
uint8_t idx = 0;
while (std::getline(sdStatus, line)) {
std::istringstream iss(line);
string word;
while (iss >> word) {
if (word == "on") {
sif::info << "SD card " << static_cast<int>(idx) << " is on" << endl;
} else if (word == "off") {
sif::info << "SD card " << static_cast<int>(idx) << " is off" << endl;
}
}
ifstream sdStatus("/tmp/sd_status.txt");
string line;
uint8_t idx = 0;
while (std::getline(sdStatus, line)) {
std::istringstream iss(line);
string word;
while(iss >> word) {
if(word == "on") {
sif::info << "SD card " << static_cast<int>(idx) << " is on" << endl;
}
else if(word == "off") {
sif::info << "SD card " << static_cast<int>(idx) << " is off" << endl;
}
}
idx++;
}
std::remove("/tmp/sd_status.txt");
idx++;
}
std::remove("/tmp/sd_status.txt");
}
void Q7STestTask::fileTests() {
using namespace std;
ofstream testFile("/tmp/test.txt");
testFile << "Hallo Welt" << endl;
testFile.close();
using namespace std;
ofstream testFile("/tmp/test.txt");
testFile << "Hallo Welt" << endl;
testFile.close();
system("echo \"Hallo Welt\" > /tmp/test2.txt");
system("echo \"Hallo Welt\"");
system("echo \"Hallo Welt\" > /tmp/test2.txt");
system("echo \"Hallo Welt\"");
}
void Q7STestTask::testScratchApi() {
ReturnValue_t result = scratch::writeNumber("TEST", 1);
if(result != HasReturnvaluesIF::RETURN_OK) {
sif::debug << "Q7STestTask::scratchApiTest: Writing number failed" << std::endl;
}
int number = 0;
result = scratch::readNumber("TEST", number);
sif::info << "Q7STestTask::testScratchApi: Value for key \"TEST\": " << number << std::endl;
if(result != HasReturnvaluesIF::RETURN_OK) {
sif::debug << "Q7STestTask::scratchApiTest: Reading number failed" << std::endl;
}
ReturnValue_t result = scratch::writeNumber("TEST", 1);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::debug << "Q7STestTask::scratchApiTest: Writing number failed" << std::endl;
}
int number = 0;
result = scratch::readNumber("TEST", number);
sif::info << "Q7STestTask::testScratchApi: Value for key \"TEST\": " << number << std::endl;
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::debug << "Q7STestTask::scratchApiTest: Reading number failed" << std::endl;
}
result = scratch::writeString("TEST2", "halloWelt");
if(result != HasReturnvaluesIF::RETURN_OK) {
sif::debug << "Q7STestTask::scratchApiTest: Writing string failed" << std::endl;
}
std::string string;
result = scratch::readString("TEST2", string);
if(result != HasReturnvaluesIF::RETURN_OK) {
sif::debug << "Q7STestTask::scratchApiTest: Reading number failed" << std::endl;
}
sif::info << "Q7STestTask::testScratchApi: Value for key \"TEST2\": " << string << std::endl;
result = scratch::writeString("TEST2", "halloWelt");
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::debug << "Q7STestTask::scratchApiTest: Writing string failed" << std::endl;
}
std::string string;
result = scratch::readString("TEST2", string);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::debug << "Q7STestTask::scratchApiTest: Reading number failed" << std::endl;
}
sif::info << "Q7STestTask::testScratchApi: Value for key \"TEST2\": " << string << std::endl;
result = scratch::clearValue("TEST");
result = scratch::clearValue("TEST2");
result = scratch::clearValue("TEST");
result = scratch::clearValue("TEST2");
}
void Q7STestTask::testJsonLibDirect() {
Stopwatch stopwatch;
// for convenience
using json = nlohmann::json;
json helloTest;
// add a number that is stored as double (note the implicit conversion of j to an object)
helloTest["pi"] = 3.141;
std::string mntPrefix = SdCardManager::instance()->getCurrentMountPrefix();
std::string fileName = mntPrefix + "/pretty.json";
std::ofstream o(fileName);
o << std::setw(4) << helloTest << std::endl;
Stopwatch stopwatch;
// for convenience
using json = nlohmann::json;
json helloTest;
// add a number that is stored as double (note the implicit conversion of j to an object)
helloTest["pi"] = 3.141;
std::string mntPrefix = SdCardManager::instance()->getCurrentMountPrefix();
std::string fileName = mntPrefix + "/pretty.json";
std::ofstream o(fileName);
o << std::setw(4) << helloTest << std::endl;
}
void Q7STestTask::testDummyParams() {
std::string mntPrefix = SdCardManager::instance()->getCurrentMountPrefix();
DummyParameter param(mntPrefix, "dummy_json.txt");
param.printKeys();
param.print();
if(not param.getJsonFileExists()) {
param.writeJsonFile();
}
ReturnValue_t result = param.readJsonFile();
if(result != HasReturnvaluesIF::RETURN_OK) {
}
param.setValue(DummyParameter::DUMMY_KEY_PARAM_1, 3);
param.setValue(DummyParameter::DUMMY_KEY_PARAM_2, "blirb");
std::string mntPrefix = SdCardManager::instance()->getCurrentMountPrefix();
DummyParameter param(mntPrefix, "dummy_json.txt");
param.printKeys();
param.print();
if (not param.getJsonFileExists()) {
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);
sif::info << "Test value (3 expected): " << test << std::endl;
sif::info << "Test value 2 (\"blirb\" expected): " << test2 << std::endl;
ReturnValue_t result = param.readJsonFile();
if (result != HasReturnvaluesIF::RETURN_OK) {
}
param.setValue(DummyParameter::DUMMY_KEY_PARAM_1, 3);
param.setValue(DummyParameter::DUMMY_KEY_PARAM_2, "blirb");
param.writeJsonFile();
param.print();
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;
}
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;
}
return TestTask::initialize();
}
void Q7STestTask::testProtHandler() {
bool opPerformed = false;
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
// If any chips are unlocked, lock them here
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(xsc::Chip::SELF_CHIP, xsc::Copy::SELF_COPY, false,
opPerformed, true);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
}
if (not opPerformed) {
sif::warning << "Q7STestTask::testProtHandler: No op performed" << std::endl;
}
int retval = std::system("print-chip-prot-status.sh");
if (retval != 0) {
utility::handleSystemError(retval, "Q7STestTask::testProtHandler");
}
// lock own copy
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;
}
if (not opPerformed) {
sif::warning << "Q7STestTask::testProtHandler: No op performed" << std::endl;
}
retval = std::system("print-chip-prot-status.sh");
if (retval != 0) {
utility::handleSystemError(retval, "Q7STestTask::testProtHandler");
}
// unlock specific copy
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;
}
if (not opPerformed) {
sif::warning << "Q7STestTask::testProtHandler: No op performed" << std::endl;
}
retval = std::system("print-chip-prot-status.sh");
if (retval != 0) {
utility::handleSystemError(retval, "Q7STestTask::testProtHandler");
}
// lock specific copy
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;
}
if (not opPerformed) {
sif::warning << "Q7STestTask::testProtHandler: No op performed" << std::endl;
}
retval = std::system("print-chip-prot-status.sh");
if (retval != 0) {
utility::handleSystemError(retval, "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);
if(fsHandler == nullptr) {
sif::warning << "Q7STestTask::testFileSystemHandlerDirect: No FS handler running.."
<< std::endl;
}
FileSystemHandler::FsCommandCfg cfg = {};
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
auto fsHandler = ObjectManager::instance()->get<FileSystemHandler>(objects::FILE_SYSTEM_HANDLER);
if (fsHandler == nullptr) {
sif::warning << "Q7STestTask::testFileSystemHandlerDirect: No FS handler running.."
<< std::endl;
}
FileSystemHandler::FsCommandCfg cfg = {};
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
// Lambda for common code
auto createNonEmptyTmpDir = [&]() {
if(not std::filesystem::exists("/tmp/test")) {
result = fsHandler->createDirectory("/tmp/test", &cfg);
if(result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
}
// Creating sample files
sif::info << "Creating sample files in directory" << std::endl;
result = fsHandler->createFile("/tmp/test", "test1.txt", nullptr, 0, &cfg);
if(result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
result = fsHandler->createFile("/tmp/test", "test2.txt", nullptr, 0, &cfg);
if(result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
// Lambda for common code
auto createNonEmptyTmpDir = [&]() {
if (not std::filesystem::exists("/tmp/test")) {
result = fsHandler->createDirectory("/tmp", "test", false, &cfg);
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
};
}
}
// Creating sample files
sif::info << "Creating sample files in directory" << std::endl;
result = fsHandler->createFile("/tmp/test", "test1.txt", nullptr, 0, &cfg);
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
result = fsHandler->createFile("/tmp/test", "test2.txt", nullptr, 0, &cfg);
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
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);
break;
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);
break;
}
case(FsOpCodes::REMOVE_TMP_FILE): {
sif::info << "Deleting /tmp/test.txt sample file" << std::endl;
// No mount prefix, cause file is created in tmp
cfg.useMountPrefix = false;
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);
}
result = fsHandler->removeFile("/tmp", "test.txt", &cfg);
if(result == HasReturnvaluesIF::RETURN_OK) {
sif::info << "File removed successfully" << std::endl;
}
else {
sif::warning << "File removal failed!" << std::endl;
}
break;
case (FsOpCodes::REMOVE_TMP_FILE): {
sif::info << "Deleting /tmp/test.txt sample file" << std::endl;
// No mount prefix, cause file is created in tmp
cfg.useMountPrefix = false;
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);
}
result = fsHandler->removeFile("/tmp", "test.txt", &cfg);
if (result == HasReturnvaluesIF::RETURN_OK) {
sif::info << "File removed successfully" << std::endl;
} else {
sif::warning << "File removal failed!" << std::endl;
}
break;
}
case(FsOpCodes::CREATE_DIR_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
ReturnValue_t result = fsHandler->createDirectory("/tmp/test", &cfg);
if(result == HasReturnvaluesIF::RETURN_OK) {
sif::info << "Directory created successfully" << std::endl;
}
else {
sif::warning << "Directory creation failed!" << std::endl;
}
break;
case (FsOpCodes::CREATE_DIR_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
ReturnValue_t result = fsHandler->createDirectory("/tmp/", "test", false, &cfg);
if (result == HasReturnvaluesIF::RETURN_OK) {
sif::info << "Directory created successfully" << std::endl;
} else {
sif::warning << "Directory creation failed!" << std::endl;
}
break;
}
case(FsOpCodes::REMOVE_EMPTY_DIR_IN_TMP): {
// 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 {
// Delete any leftover files to regular dir removal works
std::remove("/tmp/test/*");
}
result = fsHandler->removeDirectory("/tmp/test", false, &cfg);
if(result == HasReturnvaluesIF::RETURN_OK) {
sif::info << "Directory removed successfully" << std::endl;
}
else {
sif::warning << "Directory removal failed!" << std::endl;
}
break;
case (FsOpCodes::REMOVE_EMPTY_DIR_IN_TMP): {
// No mount prefix, cause file is created in tmp
cfg.useMountPrefix = false;
if (not std::filesystem::exists("/tmp/test")) {
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);
if (result == HasReturnvaluesIF::RETURN_OK) {
sif::info << "Directory removed successfully" << std::endl;
} else {
sif::warning << "Directory removal failed!" << std::endl;
}
break;
}
case(FsOpCodes::REMOVE_FILLED_DIR_IN_TMP): {
result = createNonEmptyTmpDir();
if(result != HasReturnvaluesIF::RETURN_OK) {
return;
}
result = fsHandler->removeDirectory("/tmp/test", true, &cfg);
if(result == HasReturnvaluesIF::RETURN_OK) {
sif::info << "Directory removed recursively successfully" << std::endl;
}
else {
sif::warning << "Recursive directory removal failed!" << std::endl;
}
break;
case (FsOpCodes::REMOVE_FILLED_DIR_IN_TMP): {
result = createNonEmptyTmpDir();
if (result != HasReturnvaluesIF::RETURN_OK) {
return;
}
result = fsHandler->removeDirectory("/tmp/", "test", true, &cfg);
if (result == HasReturnvaluesIF::RETURN_OK) {
sif::info << "Directory removed recursively successfully" << std::endl;
} else {
sif::warning << "Recursive directory removal failed!" << std::endl;
}
break;
}
case(FsOpCodes::ATTEMPT_DIR_REMOVAL_NON_EMPTY): {
result = createNonEmptyTmpDir();
if(result != HasReturnvaluesIF::RETURN_OK) {
return;
}
result = fsHandler->removeDirectory("/tmp/test", false, &cfg);
if(result != HasReturnvaluesIF::RETURN_OK) {
sif::info << "Directory removal attempt failed as expected" << std::endl;
}
else {
sif::warning << "Directory removal worked when it should not have!" << std::endl;
}
case (FsOpCodes::ATTEMPT_DIR_REMOVAL_NON_EMPTY): {
result = createNonEmptyTmpDir();
if (result != HasReturnvaluesIF::RETURN_OK) {
return;
}
result = fsHandler->removeDirectory("/tmp/", "test", false, &cfg);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::info << "Directory removal attempt failed as expected" << std::endl;
} 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,29 +3,44 @@
#include "test/testtasks/TestTask.h"
class Q7STestTask: public TestTask {
public:
Q7STestTask(object_id_t objectId);
private:
ReturnValue_t performOneShotAction() override;
class CoreController;
void testSdCard();
void fileTests();
class Q7STestTask : public TestTask {
public:
Q7STestTask(object_id_t objectId);
void testScratchApi();
void testJsonLibDirect();
void testDummyParams();
ReturnValue_t initialize() override;
enum FsOpCodes {
CREATE_EMPTY_FILE_IN_TMP,
REMOVE_TMP_FILE,
CREATE_DIR_IN_TMP,
REMOVE_EMPTY_DIR_IN_TMP,
ATTEMPT_DIR_REMOVAL_NON_EMPTY,
REMOVE_FILLED_DIR_IN_TMP,
};
void testFileSystemHandlerDirect(FsOpCodes opCode);
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();
void testScratchApi();
void testJsonLibDirect();
void testDummyParams();
void testProtHandler();
enum FsOpCodes {
CREATE_EMPTY_FILE_IN_TMP,
REMOVE_TMP_FILE,
CREATE_DIR_IN_TMP,
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

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

View File

@ -0,0 +1,25 @@
#include "gnssCallback.h"
#include "devices/gpioIds.h"
#include "fsfw/tasks/TaskFactory.h"
ReturnValue_t gps::triggerGpioResetPin(void* args) {
ResetArgs* resetArgs = reinterpret_cast<ResetArgs*>(args);
if (args == nullptr) {
return HasReturnvaluesIF::RETURN_FAILED;
}
if (resetArgs->gpioComIF == nullptr) {
return HasReturnvaluesIF::RETURN_FAILED;
}
gpioId_t gpioId;
if (resetArgs->gnss1) {
gpioId = gpioIds::GNSS_1_NRESET;
} else {
gpioId = gpioIds::GNSS_0_NRESET;
}
resetArgs->gpioComIF->pullLow(gpioId);
TaskFactory::delayTask(resetArgs->waitPeriodMs);
resetArgs->gpioComIF->pullHigh(gpioId);
return HasReturnvaluesIF::RETURN_OK;
}

View File

@ -0,0 +1,19 @@
#ifndef BSP_Q7S_CALLBACKS_GNSSCALLBACK_H_
#define BSP_Q7S_CALLBACKS_GNSSCALLBACK_H_
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
struct ResetArgs {
bool gnss1 = false;
LinuxLibgpioIF* gpioComIF = nullptr;
uint32_t waitPeriodMs = 100;
};
namespace gps {
ReturnValue_t triggerGpioResetPin(void* args);
}
#endif /* BSP_Q7S_CALLBACKS_GNSSCALLBACK_H_ */

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

@ -0,0 +1,232 @@
#include "rwSpiCallback.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;
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");
if (fileHelper.getOpenResult() != HasReturnvaluesIF::RETURN_OK) {
sif::error << "rwSpiCallback::spiCallback: Failed to open device file" << std::endl;
return SpiComIF::OPENING_FILE_FAILED;
}
spi::SpiModes spiMode = spi::SpiModes::MODE_0;
uint32_t spiSpeed = 0;
cookie->getSpiParameters(spiMode, spiSpeed, nullptr);
comIf->setSpiSpeedAndMode(fileDescriptor, spiMode, spiSpeed);
result = mutex->lockMutex(timeoutType, timeoutMs);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::debug << "rwSpiCallback::spiCallback: Failed to lock mutex" << std::endl;
return result;
}
/** Sending frame start sign */
writeBuffer[0] = 0x7E;
writeSize = 1;
// Pull SPI CS low. For now, no support for active high given
if (gpioId != gpio::NO_GPIO) {
if (gpioIF->pullLow(gpioId) != HasReturnvaluesIF::RETURN_OK) {
sif::error << "rwSpiCallback::spiCallback: Failed to pull chip select low" << std::endl;
}
}
if (write(fileDescriptor, writeBuffer, writeSize) != static_cast<ssize_t>(writeSize)) {
sif::error << "rwSpiCallback::spiCallback: Write failed!" << std::endl;
closeSpi(gpioId, gpioIF, mutex);
return RwHandler::SPI_WRITE_FAILURE;
}
/** Encoding and sending command */
size_t idx = 0;
while (idx < sendLen) {
switch (*(sendData + idx)) {
case 0x7E:
writeBuffer[0] = 0x7D;
writeBuffer[1] = 0x5E;
writeSize = 2;
break;
case 0x7D:
writeBuffer[0] = 0x7D;
writeBuffer[1] = 0x5D;
writeSize = 2;
break;
default:
writeBuffer[0] = *(sendData + idx);
writeSize = 1;
break;
}
if (write(fileDescriptor, writeBuffer, writeSize) != static_cast<ssize_t>(writeSize)) {
sif::error << "rwSpiCallback::spiCallback: Write failed!" << std::endl;
closeSpi(gpioId, gpioIF, mutex);
return RwHandler::SPI_WRITE_FAILURE;
}
idx++;
}
/** Sending frame end sign */
writeBuffer[0] = 0x7E;
writeSize = 1;
if (write(fileDescriptor, writeBuffer, writeSize) != static_cast<ssize_t>(writeSize)) {
sif::error << "rwSpiCallback::spiCallback: Write failed!" << std::endl;
closeSpi(gpioId, gpioIF, mutex);
return RwHandler::SPI_WRITE_FAILURE;
}
uint8_t* rxBuf = nullptr;
result = comIf->getReadBuffer(cookie->getSpiAddress(), &rxBuf);
if (result != HasReturnvaluesIF::RETURN_OK) {
closeSpi(gpioId, gpioIF, mutex);
return result;
}
size_t replyBufferSize = cookie->getMaxBufferSize();
/** There must be a delay of at least 20 ms after sending the command */
usleep(RwDefinitions::SPI_REPLY_DELAY);
/**
* The reaction wheel responds with empty frames while preparing the reply data.
* However, receiving more than 5 empty frames will be interpreted as an error.
*/
uint8_t byteRead = 0;
for (int idx = 0; idx < 10; idx++) {
if (read(fileDescriptor, &byteRead, 1) != 1) {
sif::error << "rwSpiCallback::spiCallback: Read failed" << std::endl;
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 != FLAG_BYTE) {
break;
}
if (idx == 9) {
sif::error << "rwSpiCallback::spiCallback: Empty frame timeout" << std::endl;
closeSpi(gpioId, gpioIF, mutex);
return RwHandler::NO_REPLY;
}
}
#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;
if (read(fileDescriptor, &byteRead, 1) != 1) {
sif::error << "rwSpiCallback::spiCallback: Read failed" << std::endl;
result = RwHandler::SPI_READ_FAILURE;
break;
}
}
if (byteRead == FLAG_BYTE) {
/** Reached end of frame */
break;
} else if (byteRead == 0x7D) {
if (read(fileDescriptor, &byteRead, 1) != 1) {
sif::error << "rwSpiCallback::spiCallback: Read failed" << std::endl;
result = RwHandler::SPI_READ_FAILURE;
break;
}
if (byteRead == 0x5E) {
*(rxBuf + decodedFrameLen) = 0x7E;
decodedFrameLen++;
continue;
} else if (byteRead == 0x5D) {
*(rxBuf + decodedFrameLen) = 0x7D;
decodedFrameLen++;
continue;
} else {
sif::error << "rwSpiCallback::spiCallback: Invalid substitute" << std::endl;
closeSpi(gpioId, gpioIF, mutex);
result = RwHandler::INVALID_SUBSTITUTE;
break;
}
} else {
*(rxBuf + decodedFrameLen) = byteRead;
decodedFrameLen++;
continue;
}
/**
* There might be the unlikely case that each byte in a get-telemetry reply has been
* replaced by its substitute. Than the next byte must correspond to the end sign 0x7E.
* Otherwise there might be something wrong.
*/
if (decodedFrameLen == replyBufferSize) {
if (read(fileDescriptor, &byteRead, 1) != 1) {
sif::error << "rwSpiCallback::spiCallback: Failed to read last byte" << std::endl;
result = RwHandler::SPI_READ_FAILURE;
break;
}
if (byteRead != 0x7E) {
sif::error << "rwSpiCallback::spiCallback: Missing end sign 0x7E" << std::endl;
decodedFrameLen--;
result = RwHandler::MISSING_END_SIGN;
break;
}
}
result = HasReturnvaluesIF::RETURN_OK;
}
cookie->setTransferSize(decodedFrameLen);
closeSpi(gpioId, gpioIF, mutex);
return result;
}
void closeSpi(gpioId_t gpioId, GpioIF* gpioIF, MutexIF* mutex) {
if (gpioId != gpio::NO_GPIO) {
if (gpioIF->pullHigh(gpioId) != HasReturnvaluesIF::RETURN_OK) {
sif::error << "closeSpi: Failed to pull chip select high" << std::endl;
}
}
if (mutex->unlockMutex() != HasReturnvaluesIF::RETURN_OK) {
sif::error << "rwSpiCallback::closeSpi: Failed to unlock mutex" << std::endl;
;
}
}
} // namespace rwSpiCallback

View File

@ -1,13 +1,15 @@
#ifndef BSP_Q7S_RW_SPI_CALLBACK_H_
#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/returnvalues/HasReturnvaluesIF.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.
@ -28,8 +30,8 @@ namespace rwSpiCallback {
* To switch between the to SPI peripherals, an EMIO is used which will also be controlled
* by this function.
*/
ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie *cookie, const uint8_t *sendData,
size_t sendLen, void* args);
ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie* cookie, const uint8_t* sendData,
size_t sendLen, void* args);
/**
* @brief This function closes a spi session. Pulls the chip select to high an releases the
@ -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,142 +2,224 @@
#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
};
namespace xsc {
enum Copy: uint8_t {
COPY_0,
COPY_1,
NO_COPY
};
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 };
static constexpr ActionId_t LIST_DIRECTORY_INTO_FILE = 0;
static constexpr ActionId_t REBOOT_OBC = 32;
} // namespace xsc
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::CORE;
struct RebootFile {
static constexpr uint8_t DEFAULT_MAX_BOOT_CNT = 10;
static constexpr Event ALLOC_FAILURE = event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM);
CoreController(object_id_t objectId);
virtual~ CoreController();
ReturnValue_t initialize() override;
ReturnValue_t initializeAfterTaskCreation() 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;
static ReturnValue_t incrementAllocationFailureCount();
static void getCurrentBootCopy(Chip& chip, Copy& copy);
bool sdInitFinished() const;
private:
static Chip currentChip;
static Copy currentCopy;
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);
// States for SD state machine, which is used in non-blocking mode
enum class SdStates {
NONE,
START,
GET_INFO,
SET_STATE_SELF,
MOUNT_SELF,
// Determine operations for other SD card, depending on redundancy configuration
DETERMINE_OTHER,
SET_STATE_OTHER,
// Mount or unmount other
MOUNT_UNMOUNT_OTHER,
// Skip period because the shell command used to generate the info file sometimes is
// missing the last performed operation if executed too early
SKIP_CYCLE_BEFORE_INFO_UPDATE,
UPDATE_INFO,
// SD initialization done
IDLE,
// Used if SD switches or mount commands are issued via telecommand
SET_STATE_FROM_COMMAND,
};
static constexpr bool BLOCKING_SD_INIT = false;
SdCardManager* sdcMan = nullptr;
ReturnValue_t initSdCardBlocking();
ReturnValue_t sdStateMachine();
struct SdInfo {
sd::SdCard pref = sd::SdCard::NONE;
sd::SdState prefState = sd::SdState::OFF;
sd::SdCard other = sd::SdCard::NONE;
sd::SdState otherState = sd::SdState::OFF;
std::string prefChar = "0";
std::string otherChar = "1";
SdStates state = SdStates::START;
// Used to track whether a command was executed
bool commandExecuted = true;
bool initFinished = false;
SdCardManager::SdStatePair currentState;
uint16_t cycleCount = 0;
// These two flags are related to external commanding
bool commandIssued = false;
bool commandFinished = false;
sd::SdState currentlyCommandedState = sd::SdState::OFF;
sd::SdCard commandedCard = sd::SdCard::NONE;
sd::SdState commandedState = sd::SdState::OFF;
};
SdInfo sdInfo;
void updateSdInfoOther();
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();
ReturnValue_t initVersionFile();
ReturnValue_t initBootCopy();
ReturnValue_t initWatchdogFifo();
ReturnValue_t actionListDirectoryIntoFile(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t *data, size_t size);
ReturnValue_t actionPerformReboot(const uint8_t *data, size_t size);
void initPrint();
// Designated value for rechecking FIFO open
static constexpr int RETRY_FIFO_OPEN = -2;
int watchdogFifoFd = 0;
PeriodicOperationDivider opDivider;
void performWatchdogControlOperation();
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;
};
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 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();
ReturnValue_t initialize() override;
ReturnValue_t initializeAfterTaskCreation() 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;
/**
* Generate a file containing the chip lock/unlock states inside /tmp/chip_prot_status.txt
* @return
*/
static ReturnValue_t generateChipStateFile();
static ReturnValue_t incrementAllocationFailureCount();
static void getCurrentBootCopy(xsc::Chip& chip, xsc::Copy& copy);
ReturnValue_t updateProtInfo(bool regenerateChipStateFile = true);
/**
* Checks whether the target chip and copy are write protected and protect set them to a target
* state where applicable.
* @param targetChip
* @param targetCopy
* @param protect Target state
* @param protOperationPerformed [out] Can be used to determine whether any operation
* was performed
* @param updateProtFile Specify whether the protection info file is updated
* @return
*/
ReturnValue_t setBootCopyProtection(xsc::Chip targetChip, xsc::Copy targetCopy, bool protect,
bool& protOperationPerformed, bool updateProtFile = true);
bool sdInitFinished() const;
private:
// Designated value for rechecking FIFO open
static constexpr int RETRY_FIFO_OPEN = -2;
int watchdogFifoFd = 0;
// States for SD state machine, which is used in non-blocking mode
enum class SdStates {
NONE,
START,
GET_INFO,
SET_STATE_SELF,
MOUNT_SELF,
// Determine operations for other SD card, depending on redundancy configuration
DETERMINE_OTHER,
SET_STATE_OTHER,
// Mount or unmount other
MOUNT_UNMOUNT_OTHER,
// Skip period because the shell command used to generate the info file sometimes is
// missing the last performed operation if executed too early
SKIP_CYCLE_BEFORE_INFO_UPDATE,
UPDATE_INFO,
// SD initialization done
IDLE,
// Used if SD switches or mount commands are issued via telecommand
SET_STATE_FROM_COMMAND,
};
static constexpr bool BLOCKING_SD_INIT = false;
SdCardManager* sdcMan = nullptr;
struct SdInfo {
sd::SdCard pref = sd::SdCard::NONE;
sd::SdState prefState = sd::SdState::OFF;
sd::SdCard other = sd::SdCard::NONE;
sd::SdState otherState = sd::SdState::OFF;
std::string prefChar = "0";
std::string otherChar = "1";
SdStates state = SdStates::START;
// Used to track whether a command was executed
bool commandExecuted = true;
bool initFinished = false;
SdCardManager::SdStatePair currentState;
uint16_t cycleCount = 0;
// These two flags are related to external commanding
bool commandIssued = false;
bool commandFinished = false;
sd::SdState currentlyCommandedState = sd::SdState::OFF;
sd::SdCard commandedCard = sd::SdCard::NONE;
sd::SdState commandedState = sd::SdState::OFF;
} sdInfo;
RebootFile rebootFile = {};
bool doPerformMountedSdCardOps = true;
/**
* Index 0: Chip 0 Copy 0
* Index 1: Chip 0 Copy 1
* Index 2: Chip 1 Copy 0
* Index 3: Chip 1 Copy 1
*/
std::array<bool, 4> protArray;
PeriodicOperationDivider opDivider;
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);
void performMountedSdCardOperations();
ReturnValue_t initVersionFile();
ReturnValue_t initBootCopy();
ReturnValue_t initWatchdogFifo();
ReturnValue_t initSdCardBlocking();
void initPrint();
ReturnValue_t sdStateMachine();
void updateSdInfoOther();
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);
ReturnValue_t actionPerformReboot(const uint8_t* data, size_t size);
void performWatchdogControlOperation();
ReturnValue_t handleProtInfoUpdateLine(std::string nextLine);
int handleBootCopyProtAtIndex(xsc::Chip targetChip, xsc::Copy targetCopy, bool protect,
bool& protOperationPerformed, bool selfChip, bool selfCopy,
bool allChips, bool allCopies, uint8_t arrIdx);
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);
@ -30,282 +29,387 @@ ServiceInterfaceStream sif::warning("WARNING", true);
ServiceInterfaceStream sif::error("ERROR", true, false, true);
#endif
ObjectManagerIF *objectManager = nullptr;
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);
sif::info << "Initializing all objects.." << std::endl;
ObjectManager::instance()->initialize();
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();
/* 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;
}
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;
void (*missedDeadlineFunc)(void) = TaskFactory::printMissedDeadline;
#else
void (*missedDeadlineFunc) (void) = nullptr;
void (*missedDeadlineFunc)(void) = nullptr;
#endif
PeriodicTaskIF* coreController = factory->createPeriodicTask(
"CORE_CTRL", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
result = coreController->addComponent(objects::CORE_CONTROLLER);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("CORE_CTRL", objects::CORE_CONTROLLER);
}
/* 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) {
initmission::printAddObjectError("CCSDS_DISTRIB", objects::CCSDS_PACKET_DISTRIBUTOR);
}
result = tmTcDistributor->addComponent(objects::PUS_PACKET_DISTRIBUTOR);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS_PACKET_DISTRIB", objects::PUS_PACKET_DISTRIBUTOR);
}
result = tmTcDistributor->addComponent(objects::TM_FUNNEL);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("TM_FUNNEL", objects::TM_FUNNEL);
}
/* UDP bridge */
PeriodicTaskIF* tmtcBridgeTask = factory->createPeriodicTask(
"UDP_UNIX_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);
}
PeriodicTaskIF* tmtcPollingTask = factory->createPeriodicTask(
"UDP_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);
}
PeriodicTaskIF* plocUpdaterTask = factory->createPeriodicTask(
"PLOC_UPDATER_TASK", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.5, missedDeadlineFunc);
result = plocUpdaterTask->addComponent(objects::PLOC_UPDATER);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PLOC_UPDATER_TASK", objects::PLOC_UPDATER);
}
// FS task, task interval does not matter because it runs in permanent loop, priority low
// because it is a non-essential background task
PeriodicTaskIF* fsTask = factory->createPeriodicTask(
"FILE_SYSTEM_TASK", 25, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
result = fsTask->addComponent(objects::FILE_SYSTEM_HANDLER);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("FILE_SYSTEM_TASK", objects::FILE_SYSTEM_HANDLER);
}
#if TEST_CCSDS_BRIDGE == 1
PeriodicTaskIF* ptmeTestTask = factory->createPeriodicTask(
"PTME_TEST", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
result = ptmeTestTask->addComponent(objects::CCSDS_IP_CORE_BRIDGE);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PTME_TEST", objects::CCSDS_IP_CORE_BRIDGE);
}
#if BOARD_TE0720 == 0
PeriodicTaskIF* coreController = factory->createPeriodicTask(
"CORE_CTRL", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
result = coreController->addComponent(objects::CORE_CONTROLLER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("CORE_CTRL", objects::CORE_CONTROLLER);
}
#endif
std::vector<PeriodicTaskIF*> pusTasks;
createPusTasks(*factory, missedDeadlineFunc, pusTasks);
std::vector<PeriodicTaskIF*> pstTasks;
createPstTasks(*factory, missedDeadlineFunc, pstTasks);
std::vector<PeriodicTaskIF*> testTasks;
createTestTasks(*factory, missedDeadlineFunc, testTasks);
/* 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) {
initmission::printAddObjectError("CCSDS_DISTRIB", objects::CCSDS_PACKET_DISTRIBUTOR);
}
result = tmTcDistributor->addComponent(objects::PUS_PACKET_DISTRIBUTOR);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS_PACKET_DISTRIB", objects::PUS_PACKET_DISTRIBUTOR);
}
result = tmTcDistributor->addComponent(objects::TM_FUNNEL);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("TM_FUNNEL", objects::TM_FUNNEL);
}
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;
}
}
};
#if OBSW_ADD_TCPIP_BRIDGE == 1
// TMTC bridge
PeriodicTaskIF* tmtcBridgeTask = factory->createPeriodicTask(
"TCPIP_TMTC_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
result = tmtcBridgeTask->addComponent(objects::TMTC_BRIDGE);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("TMTC_BRIDGE", objects::TMTC_BRIDGE);
}
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) {
initmission::printAddObjectError("UDP_POLLING", objects::TMTC_POLLING_TASK);
}
#endif
sif::info << "Starting tasks.." << std::endl;
tmTcDistributor->startTask();
tmtcBridgeTask->startTask();
tmtcPollingTask->startTask();
coreController->startTask();
plocUpdaterTask->startTask();
#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
// because it is a non-essential background task
PeriodicTaskIF* fsTask = factory->createPeriodicTask(
"FILE_SYSTEM_TASK", 25, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
result = fsTask->addComponent(objects::FILE_SYSTEM_HANDLER);
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
PeriodicTaskIF* ptmeTestTask = factory->createPeriodicTask(
"PTME_TEST", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
result = ptmeTestTask->addComponent(objects::CCSDS_IP_CORE_BRIDGE);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PTME_TEST", objects::CCSDS_IP_CORE_BRIDGE);
}
#endif
std::vector<PeriodicTaskIF*> pusTasks;
createPusTasks(*factory, missedDeadlineFunc, pusTasks);
std::vector<PeriodicTaskIF*> pstTasks;
createPstTasks(*factory, missedDeadlineFunc, pstTasks);
taskStarter(pstTasks, "PST task vector");
taskStarter(pusTasks, "PUS task vector");
#if OBSW_ADD_TEST_CODE == 1
taskStarter(testTasks, "Test task vector");
std::vector<PeriodicTaskIF*> testTasks;
createTestTasks(*factory, missedDeadlineFunc, testTasks);
#endif
#if TEST_CCSDS_BRIDGE == 1
ptmeTestTask->startTask();
#endif
fsTask->startTask();
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 << "Tasks started.." << std::endl;
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
taskStarter(pstTasks, "PST task vector");
taskStarter(pusTasks, "PUS task vector");
#if OBSW_ADD_TEST_CODE == 1
taskStarter(testTasks, "Test task vector");
#endif
#if OBSW_TEST_CCSDS_BRIDGE == 1
ptmeTestTask->startTask();
#endif
#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) {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
TaskDeadlineMissedFunction missedDeadlineFunc,
std::vector<PeriodicTaskIF*>& taskVec) {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
#if BOARD_TE0720 == 0
/* Polling Sequence Table Default */
#if Q7S_ADD_SPI_TEST == 0
FixedTimeslotTaskIF* spiPst = factory.createFixedTimeslotTask(
"PST_TASK_DEFAULT", 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;
/* Polling Sequence Table Default */
#if OBSW_ADD_SPI_TEST_CODE == 0
FixedTimeslotTaskIF* spiPst = factory.createFixedTimeslotTask(
"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);
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);
result = pst::pstGpio(gpioPst);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl;
}
taskVec.push_back(gpioPst);
FixedTimeslotTaskIF* i2cPst = factory.createFixedTimeslotTask(
"I2C_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 3.0, missedDeadlineFunc);
result = pst::pstI2c(i2cPst);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl;
}
FixedTimeslotTaskIF* uartPst = factory.createFixedTimeslotTask(
"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, 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);
FixedTimeslotTaskIF* gomSpacePstTask = factory.createFixedTimeslotTask(
"GS_PST_TASK", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 1.0, missedDeadlineFunc);
result = pst::pstGompaceCan(gomSpacePstTask);
if(result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "InitMission::initTasks: GomSpace PST initialization failed!" << std::endl;
}
taskVec.push_back(i2cPst);
#else /* BOARD_TE7020 == 0 */
FixedTimeslotTaskIF * pollingSequenceTaskTE0720 = factory->createFixedTimeslotTask(
"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;
}
taskVec.push_back(pollingSequenceTaskTE0720);
#if OBSW_ADD_I2C_TEST_CODE == 0
FixedTimeslotTaskIF* i2cPst = factory.createFixedTimeslotTask(
"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);
result = pst::pstGompaceCan(gomSpacePstTask);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "InitMission::initTasks: GomSpace PST initialization failed!" << std::endl;
}
taskVec.push_back(gomSpacePstTask);
#else /* BOARD_TE7020 == 0 */
FixedTimeslotTaskIF* pollingSequenceTaskTE0720 = factory.createFixedTimeslotTask(
"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;
}
taskVec.push_back(pollingSequenceTaskTE0720);
#endif /* BOARD_TE7020 == 1 */
}
void initmission::createPusTasks(TaskFactory &factory,
TaskDeadlineMissedFunction missedDeadlineFunc, std::vector<PeriodicTaskIF*> &taskVec) {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
/* PUS Services */
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) {
initmission::printAddObjectError("PUS_VERIF", objects::PUS_SERVICE_1_VERIFICATION);
}
taskVec.push_back(pusVerification);
void initmission::createPusTasks(TaskFactory& factory,
TaskDeadlineMissedFunction missedDeadlineFunc,
std::vector<PeriodicTaskIF*>& taskVec) {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
/* PUS Services */
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) {
initmission::printAddObjectError("PUS_VERIF", objects::PUS_SERVICE_1_VERIFICATION);
}
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* 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("PUS_2", objects::PUS_SERVICE_2_DEVICE_ACCESS);
}
result = pusHighPrio->addComponent(objects::PUS_SERVICE_9_TIME_MGMT);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS_9", objects::PUS_SERVICE_9_TIME_MGMT);
}
taskVec.push_back(pusHighPrio);
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("PUS_2", objects::PUS_SERVICE_2_DEVICE_ACCESS);
}
result = pusHighPrio->addComponent(objects::PUS_SERVICE_9_TIME_MGMT);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS_9", 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("PUS_8", objects::PUS_SERVICE_8_FUNCTION_MGMT);
}
result = pusMedPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING);
if(result!=HasReturnvaluesIF::RETURN_OK){
sif::error << "Object add component failed" << std::endl;
}
result = pusMedPrio->addComponent(objects::PUS_SERVICE_200_MODE_MGMT);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS_200", objects::PUS_SERVICE_200_MODE_MGMT);
}
result = pusMedPrio->addComponent(objects::PUS_SERVICE_20_PARAMETERS);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS_20", objects::PUS_SERVICE_20_PARAMETERS);
}
taskVec.push_back(pusMedPrio);
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("PUS_8", objects::PUS_SERVICE_8_FUNCTION_MGMT);
}
result = pusMedPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "Object add component failed" << std::endl;
}
result = pusMedPrio->addComponent(objects::PUS_SERVICE_200_MODE_MGMT);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS_200", objects::PUS_SERVICE_200_MODE_MGMT);
}
result = pusMedPrio->addComponent(objects::PUS_SERVICE_20_PARAMETERS);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS_20", objects::PUS_SERVICE_20_PARAMETERS);
}
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("PUS_17", objects::PUS_SERVICE_17_TEST);
}
result = pusLowPrio->addComponent(objects::INTERNAL_ERROR_REPORTER);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("ERROR_REPORTER", objects::INTERNAL_ERROR_REPORTER);
}
taskVec.push_back(pusLowPrio);
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("PUS_17", objects::PUS_SERVICE_17_TEST);
}
result = pusLowPrio->addComponent(objects::INTERNAL_ERROR_REPORTER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("ERROR_REPORTER", objects::INTERNAL_ERROR_REPORTER);
}
taskVec.push_back(pusLowPrio);
}
void initmission::createTestTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
std::vector<PeriodicTaskIF*>& taskVec) {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
PeriodicTaskIF* testTask = factory.createPeriodicTask(
"TEST_TASK", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1, missedDeadlineFunc);
result = testTask->addComponent(objects::TEST_TASK);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("TEST_TASK", objects::TEST_TASK);
}
void initmission::createTestTasks(TaskFactory& factory,
TaskDeadlineMissedFunction missedDeadlineFunc,
std::vector<PeriodicTaskIF*>& taskVec) {
#if OBSW_ADD_TEST_TASK == 1 && OBSW_ADD_TEST_CODE == 1
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
static_cast<void>(result); // supress warning in case it is not used
#if Q7S_ADD_SPI_TEST == 1
result = testTask->addComponent(objects::SPI_TEST);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("SPI_TEST", objects::SPI_TEST);
}
PeriodicTaskIF* testTask = factory.createPeriodicTask(
"TEST_TASK", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1, missedDeadlineFunc);
result = testTask->addComponent(objects::TEST_TASK);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("TEST_TASK", objects::TEST_TASK);
}
#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);
}
#endif
#if BOARD_TE0720 == 1 && TEST_LIBGPIOD == 1
result = testTask->addComponent(objects::LIBGPIOD_TEST);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("GPIOD_TEST", objects::LIBGPIOD_TEST);
}
#endif /* BOARD_TE0720 == 1 && TEST_LIBGPIOD == 1 */
taskVec.push_back(testTask);
#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) {
initmission::printAddObjectError("GPIOD_TEST", objects::LIBGPIOD_TEST);
}
#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;
@ -12,11 +13,11 @@ void initMission();
void initTasks();
void createPstTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
std::vector<PeriodicTaskIF*>& taskVec);
std::vector<PeriodicTaskIF*>& taskVec);
void createPusTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
std::vector<PeriodicTaskIF*>& taskVec);
std::vector<PeriodicTaskIF*>& taskVec);
void createTestTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
std::vector<PeriodicTaskIF*>& taskVec);
};
std::vector<PeriodicTaskIF*>& taskVec);
}; // namespace initmission
#endif /* BSP_Q7S_INITMISSION_H_ */

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