Compare commits

..

188 Commits

Author SHA1 Message Date
b20abc5bfb Merge pull request 'eive-tmtc-bugfixes' (#236) from eive-tmtc-bugfixes into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #236
2023-09-12 13:50:25 +02:00
af1474f10c bump patch version
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-09-12 13:49:27 +02:00
66db12796b black preview mode, flake8
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-09-12 13:48:38 +02:00
2d08fc0bfa that appears to be all
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-09-12 13:47:27 +02:00
9edc819a97 eive-tmtc bugfixes 2023-09-12 13:35:26 +02:00
d23cc6834a Merge pull request 'Prepare v5.5.0' (#235) from prep_next_release into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #235
2023-09-12 13:06:18 +02:00
33cff5e2d2 changelog
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-09-12 13:05:18 +02:00
acbcbbe98f some fixes for new version
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-09-12 13:03:54 +02:00
c3b0470aa6 prep next release 2023-09-12 13:01:40 +02:00
e56f8732be Merge pull request 'Relax SUS FDIR' (#205) from relax-sus-fdir-2 into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #205
2023-09-12 10:07:12 +02:00
af5e81158c update events and retvals
Some checks are pending
EIVE/-/pipeline/pr-main Build started...
2023-09-12 10:06:26 +02:00
d285b1caec Merge remote-tracking branch 'origin/main' into relax-sus-fdir-2
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-09-07 16:03:17 +02:00
1f49f0c70d new events 2023-09-07 16:03:12 +02:00
b1fbad39e3 Merge pull request 'Prep OBSW v6.4.1' (#234) from prep-obsw-v6.4.1 into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #234
2023-08-21 18:45:25 +02:00
de57b9da5b events (wherever these changes come from?)
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-08-21 15:59:55 +02:00
f02230804d Merge pull request 'mini fixes' (#232) from mini-fixes into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #232
2023-08-16 14:04:03 +02:00
8ddcc37c74 mini fixes
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-08-16 13:25:29 +02:00
b50c75c13c Merge pull request 'PLOC SUPV HK parsing' (#231) from parse-ploc-supv-hk into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #231
2023-08-15 14:39:09 +02:00
36799ef51d v5.4.3
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-08-15 14:38:28 +02:00
772ef5b323 changelog
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-08-15 14:35:45 +02:00
2f8bed4581 works
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-08-15 14:31:49 +02:00
72def77d40 parse ploc supv HK
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-08-15 14:15:06 +02:00
bc1a1774a6 Merge pull request 'added none entry for new enum' (#230) from submode-enum-none-entry into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #230
2023-08-15 13:58:07 +02:00
4b08f5dd5b prep v5.4.2
Some checks are pending
EIVE/-/pipeline/pr-main Build queued...
2023-08-15 13:57:43 +02:00
b0562ea9c7 added none entry for new enum
Some checks are pending
EIVE/-/pipeline/head Build queued...
2023-08-15 13:54:18 +02:00
f76cd94535 prep v5.4.1
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-08-15 13:28:54 +02:00
8a1e5b7b99 changelog
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-08-15 13:21:10 +02:00
0e208629b0 subsystem enum is int enum now 2023-08-15 13:20:43 +02:00
403657110b prep v5.4.0
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-08-15 13:13:06 +02:00
23f21b40eb Merge pull request 'PL PCDU enum' (#229) from new-pl-pcdu-enum into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #229
2023-08-15 13:07:40 +02:00
a6b3ccb4cc more better names
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-08-15 11:51:41 +02:00
d7b494a950 better name 2023-08-15 11:51:12 +02:00
73bc043538 move enum
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-08-15 11:50:39 +02:00
02e7e809de PL PCDU enum
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-08-15 11:47:07 +02:00
d6f6aff139 Merge pull request 'SGP4 Propagator Prep' (#227) from spg4-propagator into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #227
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2023-08-15 10:46:27 +02:00
d39a49bd4c Merge branch 'main' into spg4-propagator
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-08-15 09:31:15 +02:00
f42318bc57 deprecated import
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-08-14 15:58:44 +02:00
fd3a799019 Merge pull request 'new pdec event' (#228) from pdec-config-readback into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #228
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-08-14 15:47:07 +02:00
1664e6adb5 Merge branch 'main' into pdec-config-readback
Some checks are pending
EIVE/-/pipeline/pr-main Build queued...
2023-08-14 15:46:57 +02:00
8042f3607d new pdec event
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-08-14 15:09:34 +02:00
59278447fd Merge branch 'main' into spg4-propagator
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-08-14 14:13:03 +02:00
b58977fd65 naming
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-08-14 12:50:50 +02:00
beae6b3f05 Merge pull request 'More GPS TM' (#226) from more-gps-tm into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #226
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2023-08-14 10:38:16 +02:00
12c60ac310 goddamnit
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-08-09 14:58:28 +02:00
1acbb8bb43 less copy-pasta helps sometimes
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-08-08 13:39:36 +02:00
051e9e6ffb lets be clean about this
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-08-08 10:01:50 +02:00
6d88746ec3 fix
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-08-08 09:40:37 +02:00
5571a6852e init 2023-08-07 14:21:58 +02:00
1ddb93410e wörks
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-08-04 16:24:16 +02:00
b0b186ac1f we need this sed_id thingy
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-08-04 15:39:40 +02:00
f95331742b fix
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-08-04 15:38:32 +02:00
c91ad9e08b bump
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-08-04 15:01:34 +02:00
fcabaa5b09 rework gps data handling
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-08-04 14:51:55 +02:00
bf9ab7edf7 this was the fun part
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-08-04 14:35:09 +02:00
957d756d1e Merge remote-tracking branch 'origin/main' into relax-sus-fdir-2
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-08-03 13:36:27 +02:00
4b054b7628 Merge pull request 'new scex event' (#225) from scex-event into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #225
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-08-02 09:46:09 +02:00
9001a28545 new scex event
Some checks are pending
EIVE/-/pipeline/head Build queued...
2023-08-02 09:41:19 +02:00
6b2fbc6917 Merge pull request 'SCEX code improvements' (#224) from scex-code-improvements into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #224
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-27 11:21:38 +02:00
ab770a0057 Merge remote-tracking branch 'origin/main' into scex-code-improvements
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-07-27 09:59:49 +02:00
0cbf28f25c scex code improvenemtns
Some checks are pending
EIVE/-/pipeline/head Build queued...
2023-07-27 09:59:34 +02:00
cbcc06ede7 Merge pull request 'ACS downwards compatibility' (#223) from acs-downwards-compat into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #223
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-26 13:17:35 +02:00
a55aa4a667 added comments
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-07-26 13:15:08 +02:00
d2324dace9 changelog and init
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-07-26 13:13:41 +02:00
1e4e524f95 update CTRL STATE enum and make it global 2023-07-26 13:12:12 +02:00
39d6ec73c2 Merge pull request 'prep v5.3.0' (#222) from prep-v5.3.0 into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #222
2023-07-26 12:56:18 +02:00
74cfa2949a flake8 and black
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-07-26 12:54:13 +02:00
ffdb4451f6 prep v5.3.0
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-07-26 12:51:56 +02:00
15716c988b Merge pull request 'new safe mode' (#221) from new-safe into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #221
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2023-07-26 09:51:26 +02:00
f5ec50b674 guess i added PTG strats in june ...
All checks were successful
EIVE/-/pipeline/head This commit looks good
EIVE/-/pipeline/pr-main This commit looks good
2023-07-24 09:47:52 +02:00
02b70ee203 Merge branch 'main' into new-safe
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-07-24 09:25:22 +02:00
95b6954175 Merge pull request 'new event' (#220) from active-sd-info-event into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #220
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-21 11:49:59 +02:00
a82cbff5a8 works well
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-07-21 11:47:37 +02:00
87b766dfb8 active SD info
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-07-21 11:36:01 +02:00
09b7a01ff6 init
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-07-21 11:20:20 +02:00
fd6b76bfdd update events.csv
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-07-21 11:04:32 +02:00
40c086086b new event
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-07-21 10:26:37 +02:00
83e8fe0587 Merge pull request 'TMTC improvements' (#219) from tmtc-improvements into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #219
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-19 14:46:51 +02:00
6cffae4397 the name is okay..
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-07-19 14:42:02 +02:00
d73ef3a314 better name for HK module
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-07-19 14:41:19 +02:00
0b8bd61e80 Merge pull request 'Update STR Commands' (#218) from update-str-cmds into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #218
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-14 12:24:50 +02:00
380a02ee94 add new STR COM error event
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-07-13 21:09:14 +02:00
c6e2e2de49 Merge branch 'main' into update-str-cmds
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-07-13 18:28:15 +02:00
6479aeda63 Merge pull request 'STR: time conversion bugfix' (#217) from str-time-conversion-fix into main
Some checks reported errors
EIVE/-/pipeline/head Something is wrong with the build of this commit
Reviewed-on: #217
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-13 14:59:58 +02:00
26cf112121 Merge branch 'str-time-conversion-fix' into update-str-cmds
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-07-13 14:59:03 +02:00
62bd535622 time conversion bugfix
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-07-13 14:49:03 +02:00
eea7683581 Merge pull request 'prep v5.2.0' (#216) from prep_v5.2.0 into main
Some checks reported errors
EIVE/-/pipeline/head Something is wrong with the build of this commit
Reviewed-on: #216
2023-07-13 11:55:26 +02:00
df6aa80169 changelog
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-07-13 11:47:47 +02:00
2fd1a46e66 bump tmtccmd to v5.0.0 2023-07-13 11:46:38 +02:00
2153aa2842 prep v5.2.0
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-07-13 11:30:43 +02:00
1f2f2aac13 update STR commands
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-07-13 10:53:42 +02:00
9be81f1725 Merge pull request 'max burn time event' (#213) from tcs-heater-upper-limit into main
Some checks failed
EIVE/-/pipeline/head There was a failure building this commit
Reviewed-on: #213
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-11 10:15:55 +02:00
601adfc9c2 Merge branch 'main' into tcs-heater-upper-limit
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-07-11 09:45:37 +02:00
ac84ac2c3e Merge pull request 'TCS CTRL Info Set' (#215) from tcs-ctrl-info-set into main
Some checks failed
EIVE/-/pipeline/head There was a failure building this commit
Reviewed-on: #215
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-11 09:31:49 +02:00
7ed18bd570 Merge pull request 'HK level is a CLI argument now' (#214) from hk-level-as-cli-arg into main
Some checks failed
EIVE/-/pipeline/head There was a failure building this commit
Reviewed-on: #214
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-07-11 09:21:39 +02:00
e27ad147d4 done
All checks were successful
EIVE/-/pipeline/head This commit looks good
EIVE/-/pipeline/pr-main This commit looks good
2023-07-10 18:29:24 +02:00
ba47757b50 added way to request new HK set
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-07-10 16:29:54 +02:00
7e9c626ec8 add command demultiplexing for tcs ctrl 2023-07-10 16:25:44 +02:00
8d6dd97d85 Merge branch 'hk-level-as-cli-arg' into tcs-ctrl-info-set
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-07-10 16:11:18 +02:00
2fae5613ce fix
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-07-10 16:09:42 +02:00
fdb14cbdc5 HK level is a CLI argument now
Some checks failed
EIVE/-/pipeline/head There was a failure building this commit
2023-07-10 16:07:01 +02:00
0cef3fa924 and now it works
Some checks failed
EIVE/-/pipeline/head There was a failure building this commit
2023-07-10 16:04:36 +02:00
37a35c4446 cli argument
Some checks failed
EIVE/-/pipeline/head There was a failure building this commit
2023-07-10 16:03:08 +02:00
15d25b4c5b max burn time event
All checks were successful
EIVE/-/pipeline/head This commit looks good
EIVE/-/pipeline/pr-main This commit looks good
2023-07-07 12:06:27 +02:00
069f84d220 Merge pull request 'Add TCS CTRL heater events' (#212) from add-tcs-ctrl-heater-events into main
Some checks failed
EIVE/-/pipeline/head There was a failure building this commit
Reviewed-on: #212
2023-07-07 10:53:32 +02:00
627a16d51a Merge branch 'main' into add-tcs-ctrl-heater-events
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-07-06 19:03:27 +02:00
fcfae1f67f Merge pull request 'add cmd to set max reboot watchdog count' (#210) from rwd-improvements into main
Some checks failed
EIVE/-/pipeline/head There was a failure building this commit
Reviewed-on: #210
2023-07-06 19:03:05 +02:00
01ebd356ba Merge branch 'main' into rwd-improvements 2023-07-06 19:02:58 +02:00
5785bbd0cc changelog
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-07-06 19:01:15 +02:00
d3e6101447 add new events 2023-07-06 19:00:39 +02:00
6d5bde40db add back TMP1075 health commands
Some checks failed
EIVE/-/pipeline/head There was a failure building this commit
2023-07-06 16:00:10 +02:00
c48f04eed5 add TCS submode
Some checks failed
EIVE/-/pipeline/head There was a failure building this commit
2023-07-06 14:15:28 +02:00
18304c31fa prep v5.1.0
Some checks failed
EIVE/-/pipeline/head There was a failure building this commit
2023-06-28 13:39:20 +02:00
8caa408cbd Merge pull request 'Internal error reporter' (#211) from internal-error-reporter into main
Some checks failed
EIVE/-/pipeline/head There was a failure building this commit
Reviewed-on: #211
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-06-28 13:16:37 +02:00
4a983958bf changelog
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-06-28 13:15:01 +02:00
03ec5bdc39 changelog
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-06-28 13:14:07 +02:00
9c5d6a15db APP logger should be root logger
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-06-28 13:10:10 +02:00
ddc80071e0 changelogge
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-06-28 10:43:11 +02:00
deb0275bb5 add cmd to set max reboot watchdog count
All checks were successful
EIVE/-/pipeline/head This commit looks good
EIVE/-/pipeline/pr-main This commit looks good
2023-06-24 18:36:33 +02:00
ec0ebc3653 handle FW info event
Some checks failed
EIVE/-/pipeline/head There was a failure building this commit
2023-06-23 02:05:04 +02:00
c9f4a8070d Merge pull request 'v5.0.0' (#209) from v5.0.0-dev into main
Some checks failed
EIVE/-/pipeline/head There was a failure building this commit
Reviewed-on: #209
2023-06-22 17:33:52 +02:00
b917358b9f prep v5.0.0
Some checks are pending
EIVE/-/pipeline/head Build started...
2023-06-22 17:33:20 +02:00
5db9f383a6 Merge pull request 'CP Helper force flag' (#208) from cp-helper-force-flag into v5.0.0-dev
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #208
2023-06-22 16:37:22 +02:00
fe3accb9ad Merge branch 'main' into cp-helper-force-flag
Some checks are pending
EIVE/-/pipeline/pr-main Build queued...
2023-06-22 16:27:44 +02:00
68d74a4748 fix
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-06-22 16:26:47 +02:00
b6ec7da7fa force flag cp helper 2023-06-22 16:26:33 +02:00
c7df13fa68 Merge pull request 'Core Controller Extension' (#207) from core-ctrl-extension into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #207
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-06-22 16:25:31 +02:00
daceb6bc1d remove pass
Some checks are pending
EIVE/-/pipeline/pr-main Build queued...
2023-06-22 16:18:52 +02:00
8239e610cc works
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-06-22 14:52:28 +02:00
b28d938468 core controller extension 2023-06-22 14:40:46 +02:00
e0457831d7 Merge pull request 'fw info event' (#206) from new-fw-info-event into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #206
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-06-22 09:19:31 +02:00
96fab88a55 Merge branch 'main' into new-fw-info-event
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-06-21 20:26:31 +02:00
50f2eb42f3 Merge pull request 'Additions for I2C' (#204) from additions-for-i2c-2 into main
Some checks failed
EIVE/-/pipeline/head There was a failure building this commit
Reviewed-on: #204
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
2023-06-21 19:14:15 +02:00
1bb8bea8d9 fw info event
All checks were successful
EIVE/-/pipeline/head This commit looks good
EIVE/-/pipeline/pr-main This commit looks good
2023-06-21 19:01:19 +02:00
0a05873f4e Squashed commit of the following:
All checks were successful
EIVE/-/pipeline/head This commit looks good
EIVE/-/pipeline/pr-main This commit looks good
commit 2b2ad0a23a
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Tue Jun 13 07:54:41 2023 +0200

    docs for events

commit 00205f0e75
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Tue Jun 13 07:43:12 2023 +0200

    new sus event

commit eae0120643
Merge: 4a990e7 fc3cf48
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Sun Jun 11 13:36:27 2023 +0200

    Merge pull request 'switched to prebuilt docker image' (#198) from mohr/docker into main

    Reviewed-on: #198

commit fc3cf480dc
Author: Ulrich Mohr <mohr@irs.uni-stuttgart.de>
Date:   Sun Jun 11 12:14:52 2023 +0200

    bump docker version

commit acca981260
Author: Ulrich Mohr <mohr@irs.uni-stuttgart.de>
Date:   Sun Jun 11 12:12:47 2023 +0200

    jenkins user in docker

commit 822eaa4c89
Author: Ulrich Mohr <mohr@irs.uni-stuttgart.de>
Date:   Sun Jun 11 12:01:26 2023 +0200

    removed empty `environment` block in Jenkinsfile which Jenkins does not like

    diva....

commit 252d140b8e
Author: Ulrich Mohr <mohr@irs.uni-stuttgart.de>
Date:   Sun Jun 11 11:56:39 2023 +0200

    switched to prebuilt docker image

commit 4a990e704b
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Sat Jun 10 14:58:15 2023 +0200

    added basic automation file

commit 522f273c99
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Sat Jun 10 14:48:02 2023 +0200

    add date in changelog

commit 1724a90a26
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Sat Jun 10 14:46:00 2023 +0200

    add release checklist

commit 7b21070363
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Sat Jun 10 14:42:28 2023 +0200

    linter fixes, version bump

commit d390168829
Merge: 238bbd5 a969481
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Sat Jun 10 14:10:42 2023 +0200

    Merge pull request 'v4.0.0-dev' (#197) from v4.0.0-dev into main

    Reviewed-on: #197

commit a969481698
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Fri Jun 9 18:53:11 2023 +0200

    imtq parsing fixes

commit 8bdba71dc3
Merge: 8804a4e e3800ac
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Fri Jun 9 12:44:00 2023 +0200

    Merge pull request 'Rework logging handling' (#194) from rework_logging_handling into v4.0.0-dev

    Reviewed-on: #194

commit e3800ac0c9
Merge: 1548278 8804a4e
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Fri Jun 9 12:43:21 2023 +0200

    Merge branch 'v4.0.0-dev' into rework_logging_handling

commit 8804a4e8e9
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Fri Jun 9 12:43:08 2023 +0200

    bump tmtccmd to v5.0.0rc0

commit 1548278ad6
Merge: 148a52a ac140ae
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Fri Jun 9 12:42:26 2023 +0200

    Merge remote-tracking branch 'origin/v4.0.0-dev' into rework_logging_handling

commit 148a52a69a
Merge: e45072c 238bbd5
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Fri Jun 9 12:42:16 2023 +0200

    Merge remote-tracking branch 'origin/main' into rework_logging_handling

commit ac140aeb2c
Merge: c6c4b9a a5a30d3
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Fri Jun 9 12:41:55 2023 +0200

    Merge pull request 'moved 2 parameters' (#196) from move-pdu-datavar into v4.0.0-dev

    Reviewed-on: #196

commit a5a30d37eb
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Fri Jun 9 12:41:49 2023 +0200

    tweak changelog

commit d9194207a4
Merge: 14d14f1 c6c4b9a
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Fri Jun 9 12:39:38 2023 +0200

    Merge remote-tracking branch 'origin/v4.0.0-dev' into move-pdu-datavar

commit 14d14f12c0
Merge: 17dd9de 238bbd5
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Wed Jun 7 17:27:52 2023 +0200

    Merge branch 'v3.2.0-dev' into move-pdu-datavar

commit 17dd9de51e
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Wed Jun 7 17:25:51 2023 +0200

    moved 2 parameters

commit 238bbd5843
Merge: 6182369 de02d81
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Wed Jun 7 17:16:37 2023 +0200

    Merge pull request 'better exception handling' (#195) from better-exception-handling into v3.2.0-dev

    Reviewed-on: #195

commit de02d81e1d
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Wed Jun 7 16:56:43 2023 +0200

    better exception handling

commit e45072c38d
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Thu May 25 11:31:06 2023 +0200

    import replacement

commit fe96f115d5
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Wed May 24 13:50:37 2023 +0200

    that should be all

commit e9e43f03d2
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Wed May 24 13:44:45 2023 +0200

    more stuff

commit aab093cc0a
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Tue May 23 09:54:51 2023 +0200

    rework it

commit c6c4b9a995
Merge: 280c724 5f379bf
Author: Marius Eggert <eggertm@irs.uni-stuttgart.de>
Date:   Mon May 22 10:42:49 2023 +0200

    Merge pull request 'Bugfix CFDP' (#191) from bugfix-cfdp into v4.0.0-dev

    Reviewed-on: #191

commit 6182369e4f
Merge: d23c0c2 620360c
Author: Marius Eggert <eggertm@irs.uni-stuttgart.de>
Date:   Mon May 22 10:41:54 2023 +0200

    Merge pull request 'generic systemctl' (#193) from generic_systemctl into main

    Reviewed-on: #193
    Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>

commit 620360c8e8
Merge: 49dde29 d23c0c2
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Fri May 19 11:02:35 2023 +0200

    Merge branch 'main' into generic_systemctl

commit 49dde29847
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Fri May 19 11:01:06 2023 +0200

    generic systemctl

commit d23c0c20fc
Merge: 280c724 ef1da1e
Author: Marius Eggert <eggertm@irs.uni-stuttgart.de>
Date:   Fri May 19 10:44:01 2023 +0200

    Merge pull request 'new MPSoC events and retvals' (#192) from mpsoc_new_events_retvals into main

    Reviewed-on: #192
    Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>

commit ef1da1e882
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Wed May 17 19:00:17 2023 +0200

    changelog

commit 6ec0ce20fa
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Wed May 17 17:15:43 2023 +0200

    new event

commit 5f379bf2bb
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Mon May 15 16:43:40 2023 +0200

    changelog

commit 7c1e7226e0
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Mon May 15 16:42:56 2023 +0200

    bugfix CFDP: bump tmtccmd

commit b8e1c7afe9
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Mon May 15 15:20:56 2023 +0200

    new MPSoC events and retvals

commit 280c72439e
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Mon May 15 14:18:18 2023 +0200

    bugfix MPSoC command

commit 14c42a91ff
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Mon May 15 13:43:26 2023 +0200

    rework read and write prompts for MPSoC

commit dd3e4c649b
Merge: 3b16717 0c1bfc6
Author: Marius Eggert <eggertm@irs.uni-stuttgart.de>
Date:   Mon May 15 09:10:41 2023 +0200

    Merge pull request 'MPSoC flash content reporter' (#190) from mpsoc_action_reply_handler into main

    Reviewed-on: #190
    Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>

commit 3b16717ce2
Merge: 377e98b f1a0334
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Fri May 12 16:27:39 2023 +0200

    Merge pull request 'fixfixfix' (#189) from ploc_pwr_switching_fix into main

    Reviewed-on: #189

commit f1a0334d3d
Merge: f090c3a 377e98b
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Fri May 12 16:27:33 2023 +0200

    Merge branch 'main' into ploc_pwr_switching_fix

commit 0c1bfc6fd3
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Fri May 12 16:27:16 2023 +0200

    bump changelog

commit 04bbe057e7
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Fri May 12 16:24:45 2023 +0200

    flash c ontent report works now

commit e05a54b076
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Fri May 12 16:08:57 2023 +0200

    somethings wrong with the format

commit ef0adef04a
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Fri May 12 15:51:17 2023 +0200

    start adding action reply handler for MPSoC

commit 377e98b5c2
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Fri May 12 13:22:58 2023 +0200

    bugfix MPSoC HK parsing

commit 87e5abe8eb
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Fri May 12 11:51:47 2023 +0200

    add missing command list of PLOC MPSoC commands

commit f090c3af66
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Thu May 11 17:55:15 2023 +0200

    fixfixfix

commit 13fd9a7d84
Merge: 4d921e0 bbcc0f9
Author: Marius Eggert <eggertm@irs.uni-stuttgart.de>
Date:   Thu May 4 15:30:49 2023 +0200

    Merge pull request 'impl MPSoC HK parsing' (#188) from mpsoc_commands into main

    Reviewed-on: #188
    Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>

commit bbcc0f9de7
Merge: a0aa652 1ab8710
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Thu May 4 15:17:12 2023 +0200

    Merge branch 'mpsoc_commands' of https://egit.irs.uni-stuttgart.de/eive/eive-tmtc into mpsoc_commands

commit a0aa6525e4
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Thu May 4 15:17:00 2023 +0200

    fix

commit 1ab8710040
Merge: f480d86 4d921e0
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Thu May 4 14:51:13 2023 +0200

    Merge branch 'main' into mpsoc_commands

commit f480d86fbd
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Thu May 4 14:50:38 2023 +0200

    impl MPSoC HK parsing

commit 4d921e01af
Merge: e85d1a1 b505524
Author: Marius Eggert <eggertm@irs.uni-stuttgart.de>
Date:   Thu May 4 12:01:43 2023 +0200

    Merge pull request 'MPSoC module update' (#187) from mpsoc_commands into main

    Reviewed-on: #187
    Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>

commit b505524e0b
Merge: e0e9a31 e85d1a1
Author: Marius Eggert <eggertm@irs.uni-stuttgart.de>
Date:   Thu May 4 12:01:33 2023 +0200

    Merge branch 'main' into mpsoc_commands

commit e0e9a310b9
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Thu May 4 11:51:50 2023 +0200

    add command to get flash dir content

commit 0e9ebefc87
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Thu May 4 11:27:12 2023 +0200

    new mpsoc commands

commit e85d1a1966
Merge: 60fba8b 4ff50b6
Author: Marius Eggert <eggertm@irs.uni-stuttgart.de>
Date:   Wed May 3 13:36:31 2023 +0200

    Merge pull request 'most important bugfix' (#186) from most-important-bugfix into main

    Reviewed-on: #186

commit 4ff50b6559
Author: meggert <eggertm@irs.uni-stuttgart.de>
Date:   Wed May 3 13:34:14 2023 +0200

    bub

commit 60fba8b6d9
Merge: 5fbd19b 1707f24
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Fri Apr 28 10:25:35 2023 +0200

    Merge pull request 'more system modes' (#185) from more-system-modes into main

    Reviewed-on: #185

commit 1707f24612
Author: meggert <eggertm@irs.uni-stuttgart.de>
Date:   Wed Apr 19 15:10:44 2023 +0200

    more system modes

commit 5fbd19bb6c
Merge: 4083a30 0c6a967
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Mon Apr 17 18:41:08 2023 +0200

    Merge branch 'main' of https://egit.irs.uni-stuttgart.de/eive/eive-tmtc
2023-06-19 18:03:45 +02:00
80d231586e Squashed commit of the following:
All checks were successful
EIVE/-/pipeline/head This commit looks good
EIVE/-/pipeline/pr-main This commit looks good
commit 79060acfb6
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Sun Jun 18 16:19:00 2023 +0200

    add enable HK set cmd

commit b9038f1c86
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Sun Jun 18 13:37:21 2023 +0200

    add back PL PCDU 1

commit fd20a9fe3c
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Sun Jun 18 13:30:45 2023 +0200

    add TMP1075 HK handling

commit 936dcdf334
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Thu Jun 15 05:15:05 2023 +0200

    remove sw update, add fake test files

commit 29fc7a5fca
Merge: e106e0b 2202c95
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Wed Jun 14 07:46:34 2023 +0200

    Merge pull request 'Some minor tweaks for BPX commands' (#202) from add-bpx-man-heater-cmds into main

    Reviewed-on: #202

commit 2202c95c4c
Merge: b38da20 e106e0b
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Wed Jun 14 07:46:23 2023 +0200

    Merge branch 'main' into add-bpx-man-heater-cmds

commit b38da20953
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Wed Jun 14 07:46:00 2023 +0200

    some better doc

commit f9a61fa485
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Wed Jun 14 07:45:03 2023 +0200

    clean up batt cmds a bit

commit e106e0bc63
Merge: 970c899 d1bd8f1
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Wed Jun 14 07:43:19 2023 +0200

    Merge pull request 'added BPX manual heater commands' (#201) from add-bpx-man-heater-cmds into main

    Reviewed-on: #201

commit d1bd8f15d9
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Wed Jun 14 07:42:12 2023 +0200

    added BPX manual heater commands

commit 970c8998f0
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Wed Jun 14 06:16:17 2023 +0200

    prep v4.1.0

commit 8a87d83653
Merge: eae0120 cf55b36
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Wed Jun 14 06:06:58 2023 +0200

    Merge pull request 'Add more heater commands' (#200) from add-heater-cmd-ids into main

    Reviewed-on: #200

commit cf55b3630c
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Wed Jun 14 05:16:21 2023 +0200

    add set cfg and rst cfg

commit 656e75052b
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Wed Jun 14 02:59:20 2023 +0200

    fix broken IDs

commit e91bf01daf
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Wed Jun 14 02:03:20 2023 +0200

    add heater cmd IDs

commit eae0120643
Merge: 4a990e7 fc3cf48
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Sun Jun 11 13:36:27 2023 +0200

    Merge pull request 'switched to prebuilt docker image' (#198) from mohr/docker into main

    Reviewed-on: #198

commit fc3cf480dc
Author: Ulrich Mohr <mohr@irs.uni-stuttgart.de>
Date:   Sun Jun 11 12:14:52 2023 +0200

    bump docker version

commit acca981260
Author: Ulrich Mohr <mohr@irs.uni-stuttgart.de>
Date:   Sun Jun 11 12:12:47 2023 +0200

    jenkins user in docker

commit 822eaa4c89
Author: Ulrich Mohr <mohr@irs.uni-stuttgart.de>
Date:   Sun Jun 11 12:01:26 2023 +0200

    removed empty `environment` block in Jenkinsfile which Jenkins does not like

    diva....

commit 252d140b8e
Author: Ulrich Mohr <mohr@irs.uni-stuttgart.de>
Date:   Sun Jun 11 11:56:39 2023 +0200

    switched to prebuilt docker image

commit 4a990e704b
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Sat Jun 10 14:58:15 2023 +0200

    added basic automation file

commit 522f273c99
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Sat Jun 10 14:48:02 2023 +0200

    add date in changelog

commit 1724a90a26
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Sat Jun 10 14:46:00 2023 +0200

    add release checklist

commit 7b21070363
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Sat Jun 10 14:42:28 2023 +0200

    linter fixes, version bump

commit d390168829
Merge: 238bbd5 a969481
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Sat Jun 10 14:10:42 2023 +0200

    Merge pull request 'v4.0.0-dev' (#197) from v4.0.0-dev into main

    Reviewed-on: #197

commit a969481698
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Fri Jun 9 18:53:11 2023 +0200

    imtq parsing fixes

commit 8bdba71dc3
Merge: 8804a4e e3800ac
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Fri Jun 9 12:44:00 2023 +0200

    Merge pull request 'Rework logging handling' (#194) from rework_logging_handling into v4.0.0-dev

    Reviewed-on: #194

commit e3800ac0c9
Merge: 1548278 8804a4e
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Fri Jun 9 12:43:21 2023 +0200

    Merge branch 'v4.0.0-dev' into rework_logging_handling

commit 8804a4e8e9
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Fri Jun 9 12:43:08 2023 +0200

    bump tmtccmd to v5.0.0rc0

commit 1548278ad6
Merge: 148a52a ac140ae
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Fri Jun 9 12:42:26 2023 +0200

    Merge remote-tracking branch 'origin/v4.0.0-dev' into rework_logging_handling

commit 148a52a69a
Merge: e45072c 238bbd5
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Fri Jun 9 12:42:16 2023 +0200

    Merge remote-tracking branch 'origin/main' into rework_logging_handling

commit ac140aeb2c
Merge: c6c4b9a a5a30d3
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Fri Jun 9 12:41:55 2023 +0200

    Merge pull request 'moved 2 parameters' (#196) from move-pdu-datavar into v4.0.0-dev

    Reviewed-on: #196

commit a5a30d37eb
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Fri Jun 9 12:41:49 2023 +0200

    tweak changelog

commit d9194207a4
Merge: 14d14f1 c6c4b9a
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Fri Jun 9 12:39:38 2023 +0200

    Merge remote-tracking branch 'origin/v4.0.0-dev' into move-pdu-datavar

commit 14d14f12c0
Merge: 17dd9de 238bbd5
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Wed Jun 7 17:27:52 2023 +0200

    Merge branch 'v3.2.0-dev' into move-pdu-datavar

commit 17dd9de51e
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Wed Jun 7 17:25:51 2023 +0200

    moved 2 parameters

commit 238bbd5843
Merge: 6182369 de02d81
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Wed Jun 7 17:16:37 2023 +0200

    Merge pull request 'better exception handling' (#195) from better-exception-handling into v3.2.0-dev

    Reviewed-on: #195

commit de02d81e1d
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Wed Jun 7 16:56:43 2023 +0200

    better exception handling

commit e45072c38d
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Thu May 25 11:31:06 2023 +0200

    import replacement

commit fe96f115d5
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Wed May 24 13:50:37 2023 +0200

    that should be all

commit e9e43f03d2
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Wed May 24 13:44:45 2023 +0200

    more stuff

commit aab093cc0a
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Tue May 23 09:54:51 2023 +0200

    rework it

commit c6c4b9a995
Merge: 280c724 5f379bf
Author: Marius Eggert <eggertm@irs.uni-stuttgart.de>
Date:   Mon May 22 10:42:49 2023 +0200

    Merge pull request 'Bugfix CFDP' (#191) from bugfix-cfdp into v4.0.0-dev

    Reviewed-on: #191

commit 6182369e4f
Merge: d23c0c2 620360c
Author: Marius Eggert <eggertm@irs.uni-stuttgart.de>
Date:   Mon May 22 10:41:54 2023 +0200

    Merge pull request 'generic systemctl' (#193) from generic_systemctl into main

    Reviewed-on: #193
    Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>

commit 620360c8e8
Merge: 49dde29 d23c0c2
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Fri May 19 11:02:35 2023 +0200

    Merge branch 'main' into generic_systemctl

commit 49dde29847
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Fri May 19 11:01:06 2023 +0200

    generic systemctl

commit d23c0c20fc
Merge: 280c724 ef1da1e
Author: Marius Eggert <eggertm@irs.uni-stuttgart.de>
Date:   Fri May 19 10:44:01 2023 +0200

    Merge pull request 'new MPSoC events and retvals' (#192) from mpsoc_new_events_retvals into main

    Reviewed-on: #192
    Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>

commit ef1da1e882
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Wed May 17 19:00:17 2023 +0200

    changelog

commit 6ec0ce20fa
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Wed May 17 17:15:43 2023 +0200

    new event

commit 5f379bf2bb
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Mon May 15 16:43:40 2023 +0200

    changelog

commit 7c1e7226e0
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Mon May 15 16:42:56 2023 +0200

    bugfix CFDP: bump tmtccmd

commit b8e1c7afe9
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Mon May 15 15:20:56 2023 +0200

    new MPSoC events and retvals

commit 280c72439e
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Mon May 15 14:18:18 2023 +0200

    bugfix MPSoC command

commit 14c42a91ff
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Mon May 15 13:43:26 2023 +0200

    rework read and write prompts for MPSoC

commit dd3e4c649b
Merge: 3b16717 0c1bfc6
Author: Marius Eggert <eggertm@irs.uni-stuttgart.de>
Date:   Mon May 15 09:10:41 2023 +0200

    Merge pull request 'MPSoC flash content reporter' (#190) from mpsoc_action_reply_handler into main

    Reviewed-on: #190
    Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>

commit 3b16717ce2
Merge: 377e98b f1a0334
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Fri May 12 16:27:39 2023 +0200

    Merge pull request 'fixfixfix' (#189) from ploc_pwr_switching_fix into main

    Reviewed-on: #189

commit f1a0334d3d
Merge: f090c3a 377e98b
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Fri May 12 16:27:33 2023 +0200

    Merge branch 'main' into ploc_pwr_switching_fix

commit 0c1bfc6fd3
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Fri May 12 16:27:16 2023 +0200

    bump changelog

commit 04bbe057e7
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Fri May 12 16:24:45 2023 +0200

    flash c ontent report works now

commit e05a54b076
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Fri May 12 16:08:57 2023 +0200

    somethings wrong with the format

commit ef0adef04a
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Fri May 12 15:51:17 2023 +0200

    start adding action reply handler for MPSoC

commit 377e98b5c2
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Fri May 12 13:22:58 2023 +0200

    bugfix MPSoC HK parsing

commit 87e5abe8eb
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Fri May 12 11:51:47 2023 +0200

    add missing command list of PLOC MPSoC commands

commit f090c3af66
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de>
Date:   Thu May 11 17:55:15 2023 +0200

    fixfixfix

commit 13fd9a7d84
Merge: 4d921e0 bbcc0f9
Author: Marius Eggert <eggertm@irs.uni-stuttgart.de>
Date:   Thu May 4 15:30:49 2023 +0200

    Merge pull request 'impl MPSoC HK parsing' (#188) from mpsoc_commands into main

    Reviewed-on: #188
    Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>

commit bbcc0f9de7
Merge: a0aa652 1ab8710
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Thu May 4 15:17:12 2023 +0200

    Merge branch 'mpsoc_commands' of https://egit.irs.uni-stuttgart.de/eive/eive-tmtc into mpsoc_commands

commit a0aa6525e4
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Thu May 4 15:17:00 2023 +0200

    fix

commit 1ab8710040
Merge: f480d86 4d921e0
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Thu May 4 14:51:13 2023 +0200

    Merge branch 'main' into mpsoc_commands

commit f480d86fbd
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Thu May 4 14:50:38 2023 +0200

    impl MPSoC HK parsing

commit 4d921e01af
Merge: e85d1a1 b505524
Author: Marius Eggert <eggertm@irs.uni-stuttgart.de>
Date:   Thu May 4 12:01:43 2023 +0200

    Merge pull request 'MPSoC module update' (#187) from mpsoc_commands into main

    Reviewed-on: #187
    Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>

commit b505524e0b
Merge: e0e9a31 e85d1a1
Author: Marius Eggert <eggertm@irs.uni-stuttgart.de>
Date:   Thu May 4 12:01:33 2023 +0200

    Merge branch 'main' into mpsoc_commands

commit e0e9a310b9
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Thu May 4 11:51:50 2023 +0200

    add command to get flash dir content

commit 0e9ebefc87
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Thu May 4 11:27:12 2023 +0200

    new mpsoc commands

commit e85d1a1966
Merge: 60fba8b 4ff50b6
Author: Marius Eggert <eggertm@irs.uni-stuttgart.de>
Date:   Wed May 3 13:36:31 2023 +0200

    Merge pull request 'most important bugfix' (#186) from most-important-bugfix into main

    Reviewed-on: #186

commit 4ff50b6559
Author: meggert <eggertm@irs.uni-stuttgart.de>
Date:   Wed May 3 13:34:14 2023 +0200

    bub

commit 60fba8b6d9
Merge: 5fbd19b 1707f24
Author: Robin Müller <muellerr@irs.uni-stuttgart.de>
Date:   Fri Apr 28 10:25:35 2023 +0200

    Merge pull request 'more system modes' (#185) from more-system-modes into main

    Reviewed-on: #185

commit 1707f24612
Author: meggert <eggertm@irs.uni-stuttgart.de>
Date:   Wed Apr 19 15:10:44 2023 +0200

    more system modes

commit 5fbd19bb6c
Merge: 4083a30 0c6a967
Author: Robin Mueller <robin.mueller.m@gmail.com>
Date:   Mon Apr 17 18:41:08 2023 +0200

    Merge branch 'main' of https://egit.irs.uni-stuttgart.de/eive/eive-tmtc
2023-06-19 17:59:14 +02:00
5f44cb96be add back PL PCDU 1
Some checks failed
EIVE/-/pipeline/head There was a failure building this commit
2023-06-19 17:16:23 +02:00
96136106c7 add TMP1075 HK handling 2023-06-19 17:16:23 +02:00
65a2d40614 remove sw update, add fake test files 2023-06-19 17:16:23 +02:00
7e5539ee05 some better doc 2023-06-19 17:16:23 +02:00
698cdb3e1d clean up batt cmds a bit 2023-06-19 17:16:23 +02:00
91ea3669af added BPX manual heater commands 2023-06-19 17:16:23 +02:00
dcf1483c47 prep v4.1.0 2023-06-19 17:16:23 +02:00
0ad0dc391d add set cfg and rst cfg 2023-06-19 17:16:23 +02:00
774a291f8c fix broken IDs 2023-06-19 17:16:23 +02:00
f27333fa0d add heater cmd IDs 2023-06-19 17:16:23 +02:00
5083c9390c bump docker version 2023-06-19 17:16:23 +02:00
bb4cc59049 jenkins user in docker 2023-06-19 17:16:23 +02:00
23e38990a3 removed empty environment block in Jenkinsfile which Jenkins does not like
diva....
2023-06-19 17:16:23 +02:00
8bbd37cf76 switched to prebuilt docker image 2023-06-19 17:16:23 +02:00
95511e484e added basic automation file 2023-06-19 17:16:23 +02:00
276862fa6e add date in changelog 2023-06-19 17:16:19 +02:00
4a5c2cdd4f add release checklist 2023-06-19 17:16:05 +02:00
be09b3475d linter fixes, version bump 2023-06-19 17:16:00 +02:00
8927949c4b imtq parsing fixes 2023-06-19 17:15:30 +02:00
acc58ebef1 bump tmtccmd to v5.0.0rc0 2023-06-19 17:15:30 +02:00
7bc344755f changelog 2023-06-19 17:14:51 +02:00
bde17600af bugfix CFDP: bump tmtccmd 2023-06-19 17:14:30 +02:00
0b1aff220c moved 2 parameters 2023-06-19 17:14:08 +02:00
cfbff77da8 better exception handling 2023-06-19 17:14:08 +02:00
673af7f097 import replacement 2023-06-19 17:14:08 +02:00
6f5e70dce2 that should be all 2023-06-19 17:14:08 +02:00
9b337d3077 more stuff 2023-06-19 17:14:08 +02:00
b333ffe707 rework it 2023-06-19 17:14:08 +02:00
736c12a2f8 changelog 2023-06-19 17:14:03 +02:00
773cf59632 new event 2023-06-19 17:13:32 +02:00
a3d6fa36e9 new MPSoC events and retvals 2023-06-19 17:13:32 +02:00
4043e30d34 bugfix MPSoC command 2023-06-19 17:13:32 +02:00
0276d3dab4 rework read and write prompts for MPSoC 2023-06-19 17:13:32 +02:00
1c59ff41c1 bump changelog 2023-06-19 17:13:32 +02:00
1c1af2c7c7 flash c ontent report works now 2023-06-19 17:13:32 +02:00
d74c3fc241 somethings wrong with the format 2023-06-19 17:13:32 +02:00
2b26f1b106 start adding action reply handler for MPSoC 2023-06-19 17:13:32 +02:00
9e87142324 bugfix MPSoC HK parsing 2023-06-19 17:13:32 +02:00
5c903d5b02 add missing command list of PLOC MPSoC commands 2023-06-19 17:13:32 +02:00
92b0b4189c fixfixfix 2023-06-19 17:13:32 +02:00
8b99fbdc81 fix 2023-06-19 17:13:32 +02:00
74f090833e impl MPSoC HK parsing 2023-06-19 17:13:32 +02:00
a89ecbf6d7 add command to get flash dir content 2023-06-19 17:13:32 +02:00
5d17a1c2b3 new mpsoc commands 2023-06-19 17:13:32 +02:00
c7a7ca9f79 generic systemctl 2023-06-19 17:13:32 +02:00
3b34d70c23 bub 2023-06-19 17:13:32 +02:00
45bd838a13 more system modes 2023-06-19 17:13:32 +02:00
ba1bead5ad move add section 2023-06-19 17:13:19 +02:00
dbbd22960e Merge branch 'v3.1.2-patch' into HEAD 2023-06-19 17:12:34 +02:00
4603329cf7 bump patch revision 2023-06-19 17:11:14 +02:00
9374e9eaab update generated event file 2023-06-19 17:11:00 +02:00
b6a88ef08e changelog 2023-06-19 17:07:37 +02:00
fbe54e1a2b prep v3.1.2 patch 2023-06-19 17:06:49 +02:00
51 changed files with 1161 additions and 460 deletions

View File

@ -10,6 +10,93 @@ list yields a list of all related PRs for each release.
# [unreleased] # [unreleased]
# [v5.5.1] 2023-09-12
## Fixed
- Some API usage fixes related to `tmtccmd` update.
# [v5.5.0] 2023-09-12
- Version is not specfied dynamically anymore and can be updated in `pyproject.toml`
- New events and returnvalues
- Bump `tmtccmd` to v6.0.0rc0
# [v5.4.3] 2023-08-15
## Added
- PLOC SUPV HK parsing.
# [v5.4.2] 2023-08-15
## Added
- New NONE entry for PL PCDU submode enum.
# [v5.4.1] 2023-08-15
## Added
- New event TLE_TOO_OLD
## Changed
- PL Subsystem mode ID is int enum now.
# [v5.4.0] 2023-08-15
## Added
- New enumeration for PL PCDU commanding.
- Some new events
# [v5.3.1] 2023-07-26
## Changed
- Adaptions for ACS CTRL strategy enum to make it compatible to software. Also make it re-usable
by putting it in global scope.
# [v5.3.0] 2023-07-26
## Added
- Dataset handling for new ACS fused rot rate dataset.
# [v5.2.0] 2023-07-13
- `tmtccmd` v5.0.0
## Added
- New TCS controller events
## Changed
- HK level can be specified as CLI argument now.
# [v5.1.0] 2023-06-28
## Added
- Internal error reporter dataset handling.
## Fixed
- `APP_LOGGER` is the root logger now.
## Changed
- HK is only displayed in brief format per default now. This will soon be adaptable by CLI
argument.
# [v5.0.0] 2023-06-22
## Changed
- Force flag for copy helper.
# [v4.1.0] 2023-06-14 # [v4.1.0] 2023-06-14
## Added ## Added
@ -31,6 +118,12 @@ list yields a list of all related PRs for each release.
- Fix for PLOC power switching. - Fix for PLOC power switching.
- Bump `tmtccmd` to v5.0.0rc0 for important bugfix in CFDP header. - Bump `tmtccmd` to v5.0.0rc0 for important bugfix in CFDP header.
# [v3.1.2] 2023-06-19
## Fixed
- Pin `tmtccmd` to v4.1.3 to enforce correct `spacepackets` version on install
# [v3.1.1] 2023-04-17 # [v3.1.1] 2023-04-17
## Added ## Added

View File

@ -1,14 +1,7 @@
__version__ = "4.1.0"
import logging import logging
from pathlib import Path from pathlib import Path
SW_NAME = "eive-tmtc"
VERSION_MAJOR = 4
VERSION_MINOR = 1
VERSION_REVISION = 0
EIVE_TMTC_ROOT = Path(__file__).parent EIVE_TMTC_ROOT = Path(__file__).parent
PACKAGE_ROOT = EIVE_TMTC_ROOT.parent PACKAGE_ROOT = EIVE_TMTC_ROOT.parent
APP_LOGGER = logging.getLogger(__name__) APP_LOGGER = logging.getLogger()

View File

@ -65,12 +65,13 @@ class CustomServiceList(str, enum.Enum):
PL_SS = "pl_subsystem" PL_SS = "pl_subsystem"
ACS_BRD_ASS = "acs_brd_ass" ACS_BRD_ASS = "acs_brd_ass"
SUS_BRD_ASS = "sus_brd_ass" SUS_BRD_ASS = "sus_brd_ass"
TCS = "tcs" TCS_SS = "tcs_subsystem"
TCS_CTRL = "tcs_ctrl"
TCS_ASS = "tcs_ass" TCS_ASS = "tcs_ass"
TIME = "time" TIME = "time"
PROCEDURE = "proc" PROCEDURE = "proc"
RTD = "rtd" RTD = "rtd"
TMP1075 = "tcs_tmp" TMP1075 = "tmp1075"
TVTTESTPROCEDURE = "tvtestproc" TVTTESTPROCEDURE = "tvtestproc"
SCEX = "scex" SCEX = "scex"
TM_STORE = "tm_store" TM_STORE = "tm_store"

View File

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

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

View File

@ -18,6 +18,7 @@ __OBJECT_ID_DICT = None
# Core Object IDs # Core Object IDs
SOLAR_ARRAY_DEPLOYMENT_ID = bytes([0x44, 0x41, 0x00, 0xA2]) SOLAR_ARRAY_DEPLOYMENT_ID = bytes([0x44, 0x41, 0x00, 0xA2])
INTERNAL_ERROR_REPORTER_ID = bytes([0x53, 0x04, 0x00, 0x00])
# Power Object IDs # Power Object IDs
PCDU_HANDLER_ID = bytes([0x44, 0x20, 0x00, 0xA1]) PCDU_HANDLER_ID = bytes([0x44, 0x20, 0x00, 0xA1])
@ -34,6 +35,7 @@ HEATER_CONTROLLER_ID = bytes([0x44, 0x41, 0x00, 0xA4])
TMP1075_HANDLER_TCS_BRD_0_ID = bytes([0x44, 0x42, 0x00, 0x04]) TMP1075_HANDLER_TCS_BRD_0_ID = bytes([0x44, 0x42, 0x00, 0x04])
TMP1075_HANDLER_TCS_BRD_1_ID = bytes([0x44, 0x42, 0x00, 0x05]) TMP1075_HANDLER_TCS_BRD_1_ID = bytes([0x44, 0x42, 0x00, 0x05])
TMP1075_HANDLER_PLPCDU_0_ID = bytes([0x44, 0x42, 0x00, 0x06]) TMP1075_HANDLER_PLPCDU_0_ID = bytes([0x44, 0x42, 0x00, 0x06])
TMP1075_HANDLER_PLPCDU_1_ID = bytes([0x44, 0x42, 0x00, 0x07])
TMP1075_HANDLER_IF_BRD_ID = bytes([0x44, 0x42, 0x00, 0x08]) TMP1075_HANDLER_IF_BRD_ID = bytes([0x44, 0x42, 0x00, 0x08])
# Communication Object IDs # Communication Object IDs

View File

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

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

View File

@ -6,6 +6,7 @@ from typing import cast
from eive_tmtc.tmtc.acs.gyros import handle_gyr_cmd from eive_tmtc.tmtc.acs.gyros import handle_gyr_cmd
from eive_tmtc.tmtc.acs.mgms import handle_mgm_cmd from eive_tmtc.tmtc.acs.mgms import handle_mgm_cmd
from eive_tmtc.tmtc.power.power import pack_power_commands from eive_tmtc.tmtc.power.power import pack_power_commands
from eive_tmtc.tmtc.tcs.ctrl import pack_tcs_ctrl_commands
from eive_tmtc.tmtc.tcs.rtd import pack_rtd_commands from eive_tmtc.tmtc.tcs.rtd import pack_rtd_commands
from eive_tmtc.tmtc.payload.scex import pack_scex_cmds from eive_tmtc.tmtc.payload.scex import pack_scex_cmds
from eive_tmtc.tmtc.tcs.subsystem import pack_tcs_sys_commands from eive_tmtc.tmtc.tcs.subsystem import pack_tcs_sys_commands
@ -99,13 +100,16 @@ def handle_default_procedure( # noqa C901: Complexity okay here.
if service == CustomServiceList.ACU.value: if service == CustomServiceList.ACU.value:
object_id = cast(ObjectIdU32, obj_id_man.get(ACU_HANDLER_ID)) object_id = cast(ObjectIdU32, obj_id_man.get(ACU_HANDLER_ID))
return pack_acu_commands(object_id=object_id, q=queue_helper, op_code=op_code) return pack_acu_commands(object_id=object_id, q=queue_helper, op_code=op_code)
if service == CustomServiceList.TCS.value: if service == CustomServiceList.TCS_SS.value:
return pack_tcs_sys_commands(q=queue_helper, op_code=op_code) return pack_tcs_sys_commands(q=queue_helper, op_code=op_code)
if service == CustomServiceList.TCS_CTRL.value:
return pack_tcs_ctrl_commands(q=queue_helper, op_code=op_code)
if service == CustomServiceList.TMP1075.value: if service == CustomServiceList.TMP1075.value:
menu_dict = { menu_dict = {
"0": ("TMP1075 TCS Board 0", TMP1075_HANDLER_TCS_BRD_0_ID), "0": ("TMP1075 TCS Board 0", TMP1075_HANDLER_TCS_BRD_0_ID),
"1": ("TMP1075 TCS Board 1", TMP1075_HANDLER_TCS_BRD_1_ID), "1": ("TMP1075 TCS Board 1", TMP1075_HANDLER_TCS_BRD_1_ID),
"2": ("TMP1075 PL PCDU 0", TMP1075_HANDLER_PLPCDU_0_ID), "2": ("TMP1075 PL PCDU 0", TMP1075_HANDLER_PLPCDU_0_ID),
"3": ("TMP1075 PL PCDU 1", oids.TMP1075_HANDLER_PLPCDU_1_ID),
"4": ("TMP1075 IF Board", TMP1075_HANDLER_IF_BRD_ID), "4": ("TMP1075 IF Board", TMP1075_HANDLER_IF_BRD_ID),
} }
input_helper = InputHelper(menu_dict) input_helper = InputHelper(menu_dict)

View File

@ -765,7 +765,6 @@ def gen_disable_listen_to_hk_for_x_seconds(
def activate_mgts_alternately( def activate_mgts_alternately(
q: DefaultPusQueueHelper, q: DefaultPusQueueHelper,
): ):
q.add_pus_tc( q.add_pus_tc(
pack_dipole_command( pack_dipole_command(
object_id=oids.IMTQ_HANDLER_ID, object_id=oids.IMTQ_HANDLER_ID,

View File

@ -7,6 +7,7 @@ from eive_tmtc.config.object_ids import get_object_ids
from eive_tmtc.pus_tm.defs import PrintWrapper from eive_tmtc.pus_tm.defs import PrintWrapper
from eive_tmtc.pus_tm.verification_handler import generic_retval_printout from eive_tmtc.pus_tm.verification_handler import generic_retval_printout
from eive_tmtc.tmtc.acs.subsystem import AcsMode from eive_tmtc.tmtc.acs.subsystem import AcsMode
from eive_tmtc.tmtc.core import SdState, SdCardSelect
from tmtccmd.tc.pus_200_fsfw_mode import Mode from tmtccmd.tc.pus_200_fsfw_mode import Mode
from tmtccmd.tc.pus_201_fsfw_health import FsfwHealth from tmtccmd.tc.pus_201_fsfw_health import FsfwHealth
@ -36,12 +37,13 @@ def handle_event_packet( # noqa C901: Complexity okay here
else: else:
obj_name = obj_id_obj.name obj_name = obj_id_obj.name
generic_event_string = ( generic_event_string = (
f"Object {obj_name} generated Event {info.name} (ID: {event_def.event_id:#04x}) " f"Object {obj_name} generated Event {info.name} (ID: {event_def.event_id:#04x})"
f"at {tm.time_provider.as_date_time()}" f" at {tm.time_provider.as_date_time()}"
) )
_LOGGER.info(generic_event_string) _LOGGER.info(generic_event_string)
pw.file_logger.info( pw.file_logger.info(
f"{datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}: {generic_event_string}" f"{datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')}:"
f" {generic_event_string}"
) )
specific_handler = False specific_handler = False
if info.name == "MODE_TRANSITION_FAILED": if info.name == "MODE_TRANSITION_FAILED":
@ -53,8 +55,8 @@ def handle_event_packet( # noqa C901: Complexity okay here
if info.name == "SUPV_UPDATE_PROGRESS" or info.name == "WRITE_MEMORY_FAILED": if info.name == "SUPV_UPDATE_PROGRESS" or info.name == "WRITE_MEMORY_FAILED":
additional_event_info = f"Additional info: {info.info}" additional_event_info = f"Additional info: {info.info}"
context = ( context = (
f"Progress Percent: {event_def.param1 >> 24 & 0xff} | " f"Progress Percent: {event_def.param1 >> 24 & 0xff} | Sequence Count:"
f"Sequence Count: {event_def.param1 & 0xffff} | Bytes Written: {event_def.param2}" f" {event_def.param1 & 0xffff} | Bytes Written: {event_def.param2}"
) )
pw.dlog(additional_event_info) pw.dlog(additional_event_info)
pw.dlog(context) pw.dlog(context)
@ -95,7 +97,7 @@ def handle_event_packet( # noqa C901: Complexity okay here
if info.name == "REBOOT_COUNTER": if info.name == "REBOOT_COUNTER":
boot_count = (event_def.param1 << 32) | event_def.param2 boot_count = (event_def.param1 << 32) | event_def.param2
pw.dlog(f"Total boot count: {boot_count}") pw.dlog(f"Total boot count: {boot_count}")
if info.name == "VERSION_INFO": if info.name == "VERSION_INFO" or info.name == "FIRMWARE_INFO":
specific_handler = True specific_handler = True
ver_major = (event_def.param1 >> 24) & 0xFF ver_major = (event_def.param1 >> 24) & 0xFF
ver_minor = (event_def.param1 >> 16) & 0xFF ver_minor = (event_def.param1 >> 16) & 0xFF
@ -105,8 +107,11 @@ def handle_event_packet( # noqa C901: Complexity okay here
if has_git_sha: if has_git_sha:
p2_as_bytes = event_def.param2.to_bytes(4, sys.byteorder) p2_as_bytes = event_def.param2.to_bytes(4, sys.byteorder)
git_sha = p2_as_bytes.decode("ascii") git_sha = p2_as_bytes.decode("ascii")
version_string = f"v{ver_major}.{ver_minor}.{ver_rev}" if info.name == "VERSION_INFO":
pw.dlog(f"Version {version_string}") name = "OBSW version: "
else:
name = "Firmware version: "
pw.dlog(f"{name} v{ver_major}.{ver_minor}.{ver_rev}")
if has_git_sha: if has_git_sha:
pw.dlog(f"Git SHA first four letters: {git_sha}") pw.dlog(f"Git SHA first four letters: {git_sha}")
if info.name == "CLOCK_SET": if info.name == "CLOCK_SET":
@ -123,6 +128,21 @@ def handle_event_packet( # noqa C901: Complexity okay here
time = event_def.param1 + event_def.param2 / 1000.0 time = event_def.param1 + event_def.param2 / 1000.0
time_dt = datetime.datetime.fromtimestamp(time, datetime.timezone.utc) time_dt = datetime.datetime.fromtimestamp(time, datetime.timezone.utc)
pw.dlog(f"Current time: {time_dt}") pw.dlog(f"Current time: {time_dt}")
if info.name == "ACTIVE_SD_INFO":
sd_0_state = (event_def.param2 >> 16) & 0xFFFF
sd_1_state = event_def.param2 & 0xFFFF
active_sd = event_def.param1
try:
active_sd = SdCardSelect(event_def.param1)
sd_0_state = SdState((event_def.param2 >> 16) & 0xFFFF)
sd_1_state = SdState(event_def.param2 & 0xFFFF)
except IndexError:
_LOGGER.error(f"Received invalid event fields for event {event_def}")
finally:
pw.dlog(
f"Active SD card {active_sd!r} | SD 0 State {sd_0_state!r} | SD 1 "
f"State {sd_1_state!r}"
)
if info.name == "HEALTH_INFO": if info.name == "HEALTH_INFO":
specific_handler = True specific_handler = True
health = FsfwHealth(event_def.param1) health = FsfwHealth(event_def.param1)

View File

@ -1,8 +1,8 @@
"""HK Handling for EIVE OBSW""" """HK Handling for EIVE OBSW"""
import logging import logging
# from pus_tm.tcp_server_objects import TCP_SEVER_SENSOR_TEMPERATURES
from eive_tmtc.tmtc.acs.acs_ctrl import handle_acs_ctrl_hk_data from eive_tmtc.tmtc.acs.acs_ctrl import handle_acs_ctrl_hk_data
from eive_tmtc.tmtc.internal_err_reporter import handle_ier_hk_data
from eive_tmtc.tmtc.payload.ploc_mpsoc import handle_ploc_mpsoc_hk_data from eive_tmtc.tmtc.payload.ploc_mpsoc import handle_ploc_mpsoc_hk_data
from eive_tmtc.tmtc.tcs.rtd import RTD_NAMES, handle_rtd_hk from eive_tmtc.tmtc.tcs.rtd import RTD_NAMES, handle_rtd_hk
from eive_tmtc.tmtc.acs.star_tracker import handle_str_hk_data from eive_tmtc.tmtc.acs.star_tracker import handle_str_hk_data
@ -13,6 +13,7 @@ from eive_tmtc.tmtc.payload.ploc_supervisor import handle_supv_hk_data
from eive_tmtc.tmtc.acs.reaction_wheels import handle_rw_hk_data from eive_tmtc.tmtc.acs.reaction_wheels import handle_rw_hk_data
from eive_tmtc.tmtc.com.syrlinks_handler import handle_syrlinks_hk_data from eive_tmtc.tmtc.com.syrlinks_handler import handle_syrlinks_hk_data
from eive_tmtc.tmtc.tcs import handle_thermal_controller_hk_data from eive_tmtc.tmtc.tcs import handle_thermal_controller_hk_data
from eive_tmtc.tmtc.tcs.tmp1075 import handle_tmp_1075_hk_data
from spacepackets.ecss import PusTelemetry from spacepackets.ecss import PusTelemetry
from tmtccmd.tm.pus_3_fsfw_hk import ( from tmtccmd.tm.pus_3_fsfw_hk import (
Service3Base, Service3Base,
@ -46,9 +47,7 @@ FORWARD_SENSOR_TEMPS = False
def handle_hk_packet( def handle_hk_packet(
raw_tm: bytes, raw_tm: bytes, obj_id_dict: ObjectIdDictT, printer: FsfwTmTcPrinter, hk_level: int
obj_id_dict: ObjectIdDictT,
printer: FsfwTmTcPrinter,
): ):
tm_packet = Service3FsfwTm.unpack(raw_telemetry=raw_tm, custom_hk_handling=False) tm_packet = Service3FsfwTm.unpack(raw_telemetry=raw_tm, custom_hk_handling=False)
named_obj_id = obj_id_dict.get(tm_packet.object_id.as_bytes) named_obj_id = obj_id_dict.get(tm_packet.object_id.as_bytes)
@ -56,26 +55,25 @@ def handle_hk_packet(
named_obj_id = tm_packet.object_id named_obj_id = tm_packet.object_id
if tm_packet.subservice == 25 or tm_packet.subservice == 26: if tm_packet.subservice == 25 or tm_packet.subservice == 26:
hk_data = tm_packet.tm_data[8:] hk_data = tm_packet.tm_data[8:]
if FORWARD_SENSOR_TEMPS:
# TODO: Maybe use singleton?
# TCP_SEVER_SENSOR_TEMPERATURES.report_raw_hk_data(
# object_id=named_obj_id, set_id=tm_packet.set_id, hk_data=hk_data
# )
pass
printer.generic_hk_tm_print( printer.generic_hk_tm_print(
content_type=HkContentType.HK, content_type=HkContentType.HK,
object_id=named_obj_id, object_id=named_obj_id,
set_id=tm_packet.set_id, set_id=tm_packet.set_id,
hk_data=hk_data, hk_data=hk_data,
) )
try: try:
handle_regular_hk_print( if hk_level == 1:
printer=printer, pass
object_id=named_obj_id, elif hk_level > 1:
hk_packet=tm_packet, handle_regular_hk_print(
tm=tm_packet.pus_tm, printer=printer,
hk_data=hk_data, object_id=named_obj_id,
) hk_packet=tm_packet,
tm=tm_packet.pus_tm,
hk_data=hk_data,
)
except ValueError as e: except ValueError as e:
_LOGGER.exception( _LOGGER.exception(
f"{e} error when parsing HK data coming from {named_obj_id}" f"{e} error when parsing HK data coming from {named_obj_id}"
@ -103,7 +101,9 @@ def handle_regular_hk_print( # noqa C901: Complexity okay here
elif objb == obj_ids.IMTQ_HANDLER_ID: elif objb == obj_ids.IMTQ_HANDLER_ID:
return handle_imtq_hk(pw=pw, hk_data=hk_data, set_id=set_id) return handle_imtq_hk(pw=pw, hk_data=hk_data, set_id=set_id)
elif objb == obj_ids.GPS_CONTROLLER: elif objb == obj_ids.GPS_CONTROLLER:
return handle_gps_data(pw=pw, hk_data=hk_data) return handle_gps_data(
pw=pw, set_id=set_id, hk_data=hk_data, packet_time=packet_dt
)
elif objb == obj_ids.PCDU_HANDLER_ID: elif objb == obj_ids.PCDU_HANDLER_ID:
return handle_pcdu_hk(pw=pw, set_id=set_id, hk_data=hk_data) return handle_pcdu_hk(pw=pw, set_id=set_id, hk_data=hk_data)
elif objb == obj_ids.BPX_HANDLER_ID: elif objb == obj_ids.BPX_HANDLER_ID:
@ -118,6 +118,8 @@ def handle_regular_hk_print( # noqa C901: Complexity okay here
return handle_ploc_mpsoc_hk_data(pw=pw, hk_data=hk_data, set_id=set_id) return handle_ploc_mpsoc_hk_data(pw=pw, hk_data=hk_data, set_id=set_id)
elif objb == obj_ids.ACU_HANDLER_ID: elif objb == obj_ids.ACU_HANDLER_ID:
return handle_acu_hk_data(pw=pw, hk_data=hk_data, set_id=set_id) return handle_acu_hk_data(pw=pw, hk_data=hk_data, set_id=set_id)
elif objb == obj_ids.INTERNAL_ERROR_REPORTER_ID:
return handle_ier_hk_data(pw=pw, hk_data=hk_data, set_id=set_id)
elif objb == obj_ids.RAD_SENSOR_ID: elif objb == obj_ids.RAD_SENSOR_ID:
return handle_rad_sensor_data(pw=pw, hk_data=hk_data, set_id=set_id) return handle_rad_sensor_data(pw=pw, hk_data=hk_data, set_id=set_id)
elif objb in [obj_ids.RW1_ID, obj_ids.RW2_ID, obj_ids.RW3_ID, obj_ids.RW4_ID]: elif objb in [obj_ids.RW1_ID, obj_ids.RW2_ID, obj_ids.RW3_ID, obj_ids.RW4_ID]:
@ -171,6 +173,14 @@ def handle_regular_hk_print( # noqa C901: Complexity okay here
return handle_str_hk_data(set_id=set_id, hk_data=hk_data, pw=pw) return handle_str_hk_data(set_id=set_id, hk_data=hk_data, pw=pw)
elif objb == obj_ids.PLOC_SUPV_ID: elif objb == obj_ids.PLOC_SUPV_ID:
return handle_supv_hk_data(set_id=set_id, hk_data=hk_data, pw=pw) return handle_supv_hk_data(set_id=set_id, hk_data=hk_data, pw=pw)
elif objb in [
obj_ids.TMP1075_HANDLER_TCS_BRD_0_ID,
obj_ids.TMP1075_HANDLER_TCS_BRD_1_ID,
obj_ids.TMP1075_HANDLER_IF_BRD_ID,
obj_ids.TMP1075_HANDLER_PLPCDU_0_ID,
obj_ids.TMP1075_HANDLER_PLPCDU_1_ID,
]:
return handle_tmp_1075_hk_data(set_id=set_id, hk_data=hk_data, pw=pw)
elif objb == obj_ids.ACS_CONTROLLER: elif objb == obj_ids.ACS_CONTROLLER:
return handle_acs_ctrl_hk_data( return handle_acs_ctrl_hk_data(
pw=pw, set_id=set_id, hk_data=hk_data, packet_time=packet_dt pw=pw, set_id=set_id, hk_data=hk_data, packet_time=packet_dt
@ -178,5 +188,5 @@ def handle_regular_hk_print( # noqa C901: Complexity okay here
else: else:
_LOGGER.info( _LOGGER.info(
f"Service 3 TM: Parsing for object {object_id} and set ID {set_id} " f"Service 3 TM: Parsing for object {object_id} and set ID {set_id} "
f"has not been implemented." "has not been implemented."
) )

View File

@ -18,7 +18,7 @@ from .defs import PrintWrapper
from .event_handler import handle_event_packet from .event_handler import handle_event_packet
from .verification_handler import handle_service_1_fsfw_packet, generic_retval_printout from .verification_handler import handle_service_1_fsfw_packet, generic_retval_printout
from .hk_handling import handle_hk_packet from .hk_handler import handle_hk_packet
from .action_reply_handler import handle_action_reply from .action_reply_handler import handle_action_reply
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
@ -29,12 +29,14 @@ def pus_factory_hook( # noqa C901 : Complexity okay here
verif_wrapper: VerificationWrapper, verif_wrapper: VerificationWrapper,
printer: FsfwTmTcPrinter, printer: FsfwTmTcPrinter,
raw_logger: RawTmtcTimedLogWrapper, raw_logger: RawTmtcTimedLogWrapper,
hk_level: int,
): ):
if len(packet) < 8: if len(packet) < 8:
_LOGGER.warning("Detected packet shorter than 8 bytes!") _LOGGER.warning("Detected packet shorter than 8 bytes!")
return return
try: try:
tm_packet = PusTelemetry.unpack(packet, CdsShortTimestamp.empty()) tm_packet = PusTelemetry.unpack(packet, CdsShortTimestamp.empty())
# _LOGGER.info(f"Sequence count: {tm_packet.seq_count}")
except ValueError as value_error: except ValueError as value_error:
_LOGGER.warning(f"{value_error}") _LOGGER.warning(f"{value_error}")
_LOGGER.warning("Could not generate PUS TM object from raw data") _LOGGER.warning("Could not generate PUS TM object from raw data")
@ -47,7 +49,9 @@ def pus_factory_hook( # noqa C901 : Complexity okay here
if service == 1: if service == 1:
handle_service_1_fsfw_packet(wrapper=verif_wrapper, raw_tm=packet) handle_service_1_fsfw_packet(wrapper=verif_wrapper, raw_tm=packet)
elif service == 3: elif service == 3:
handle_hk_packet(printer=printer, raw_tm=packet, obj_id_dict=obj_id_dict) handle_hk_packet(
printer=printer, raw_tm=packet, obj_id_dict=obj_id_dict, hk_level=hk_level
)
elif service == 5: elif service == 5:
handle_event_packet(raw_tm=packet, pw=pw) handle_event_packet(raw_tm=packet, pw=pw)
elif service == 8: elif service == 8:
@ -83,7 +87,8 @@ def pus_factory_hook( # noqa C901 : Complexity okay here
# TODO: Could improve display further by actually displaying a matrix as a # TODO: Could improve display further by actually displaying a matrix as a
# matrix using row and column information # matrix using row and column information
pw.dlog( pw.dlog(
f"Received vector or matrix data: {param.param_raw.hex(sep=',')}" "Received vector or matrix data:"
f" {param.param_raw.hex(sep=',')}"
) )
except ValueError as e: except ValueError as e:
pw.dlog(f"received {e} when trying to parse parameters") pw.dlog(f"received {e} when trying to parse parameters")

View File

@ -12,7 +12,6 @@ _LOGGER = logging.getLogger(__name__)
class TmTcpServer: class TmTcpServer:
def __init__(self, ip_address: str, port: int): def __init__(self, ip_address: str, port: int):
self.server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.server_socket.bind((ip_address, port)) self.server_socket.bind((ip_address, port))
@ -46,7 +45,6 @@ class TmTcpServer:
self.client_connection.setblocking(False) self.client_connection.setblocking(False)
print("Client connected") print("Client connected")
except IOError: except IOError:
return return
data_json_bytes = json.dumps(dictionary).encode() data_json_bytes = json.dumps(dictionary).encode()
@ -65,7 +63,6 @@ class TmTcpServer:
self.client_connection = None self.client_connection = None
def report_raw_hk_data(self, object_id: ObjectIdU32, set_id: int, hk_data: bytes): def report_raw_hk_data(self, object_id: ObjectIdU32, set_id: int, hk_data: bytes):
data_dict = { data_dict = {
"type": "TM", "type": "TM",
"tmType": "Raw HK", "tmType": "Raw HK",

View File

@ -48,7 +48,7 @@ def generic_retval_printout(
if retval_info is None: if retval_info is None:
raw_err = retval raw_err = retval
return [ return [
f"No returnvalue information found for error code with " "No returnvalue information found for error code with "
f"subsystem ID {(raw_err >> 8) & 0xff} and unique ID {raw_err & 0xff}" f"subsystem ID {(raw_err >> 8) & 0xff} and unique ID {raw_err & 0xff}"
] ]
else: else:
@ -58,9 +58,9 @@ def generic_retval_printout(
) )
string_list = [retval_string] string_list = [retval_string]
if p1: if p1:
error_param_1_str = f"Error Parameter 1: hex {p1:#010x} " f"dec {p1} " error_param_1_str = f"Error Parameter 1: hex {p1:#010x} dec {p1} "
string_list.append(error_param_1_str) string_list.append(error_param_1_str)
if p2: if p2:
error_param_2_str = f"Error Parameter 2: hex {p2:#010x} " f"dec {p2}" error_param_2_str = f"Error Parameter 2: hex {p2:#010x} dec {p2}"
string_list.append(error_param_2_str) string_list.append(error_param_2_str)
return string_list return string_list

View File

@ -5,3 +5,4 @@ from .time import add_time_cmds
from .health import add_health_cmd_defs from .health import add_health_cmd_defs
from .system import add_system_cmd_defs from .system import add_system_cmd_defs
from .tm_store import add_persistent_tm_store_cmd_defs from .tm_store import add_persistent_tm_store_cmd_defs
from .tcs import add_tmp_sens_cmds

View File

@ -59,12 +59,44 @@ class SetId(enum.IntEnum):
MEKF_DATA = 7 MEKF_DATA = 7
CTRL_VAL_DATA = 8 CTRL_VAL_DATA = 8
ACTUATOR_CMD_DATA = 9 ACTUATOR_CMD_DATA = 9
FUSED_ROT_RATE_DATA = 10
class ActionId(enum.IntEnum): class ActionId(enum.IntEnum):
SOLAR_ARRAY_DEPLOYMENT_SUCCESSFUL = 0 SOLAR_ARRAY_DEPLOYMENT_SUCCESSFUL = 0
RESET_MEKF = 1 RESET_MEKF = 1
RESTORE_MEKF_NONFINITE_RECOVERY = 2 RESTORE_MEKF_NONFINITE_RECOVERY = 2
UPDATE_TLE = 3
CTRL_STRAT_DICT = {
0: "OFF",
1: "NO_MAG_FIELD_FOR_CONTROL",
2: "NO_SENSORS_FOR_CONTROL",
# OBSW <= v6.1.0
10: "LEGACY_SAFE_MEKF",
11: "LEGACY_WITHOUT_MEKF",
12: "LEGACY_ECLIPSE_DAMPING",
13: "LEGACY_ECLIPSE_IDELING",
# Added in OBSW v6.2.0
14: "SAFE_MEKF",
15: "SAFE_GYR",
16: "SAFE_SUSMGM",
17: "SAFE_ECLIPSE_DAMPING_GYR",
18: "SAFE_ECLIPSE_DAMPING_SUSMGM",
19: "SAFE_ECLIPSE_IDELING",
20: "DETUMBLE_FULL",
21: "DETUMBLE_DETERIORATED",
30: "PTG_MEKF",
31: "PTG_RAW",
}
GPS_COURCE_DICT = {
0: "NONE",
1: "GPS",
2: "GPS_EXTRAPOLATED",
3: "SGP4",
}
class OpCodes: class OpCodes:
@ -79,6 +111,7 @@ class OpCodes:
SAFE_PTG = ["confirm_deployment"] SAFE_PTG = ["confirm_deployment"]
RESET_MEKF = ["reset_mekf"] RESET_MEKF = ["reset_mekf"]
RESTORE_MEKF_NONFINITE_RECOVERY = ["restore_mekf_nonfinite_recovery"] RESTORE_MEKF_NONFINITE_RECOVERY = ["restore_mekf_nonfinite_recovery"]
UPDATE_TLE = ["update_tle"]
SET_PARAMETER_SCALAR = ["set_scalar_param"] SET_PARAMETER_SCALAR = ["set_scalar_param"]
SET_PARAMETER_VECTOR = ["set_vector_param"] SET_PARAMETER_VECTOR = ["set_vector_param"]
SET_PARAMETER_MATRIX = ["set_matrix_param"] SET_PARAMETER_MATRIX = ["set_matrix_param"]
@ -112,6 +145,9 @@ class OpCodes:
REQUEST_ACT_CMD_HK = ["act_cmd_hk"] REQUEST_ACT_CMD_HK = ["act_cmd_hk"]
ENABLE_ACT_CMD_HK = ["act_cmd_enable_hk"] ENABLE_ACT_CMD_HK = ["act_cmd_enable_hk"]
DISABLE_ACT_CMD_HK = ["act_cmd_disable_hk"] DISABLE_ACT_CMD_HK = ["act_cmd_disable_hk"]
REQUEST_FUSED_ROT_RATE_HK = ["f_rot_rate_hk"]
ENABLE_FUSED_ROT_RATE_HK = ["f_rot_rate_enable_hk"]
DISABLE_FUSED_ROT_RATE_HK = ["f_rot_rate_disable_hk"]
class Info: class Info:
@ -126,6 +162,7 @@ class Info:
SAFE_PTG = "Confirm deployment of both solar arrays" SAFE_PTG = "Confirm deployment of both solar arrays"
RESET_MEKF = "Reset the MEKF" RESET_MEKF = "Reset the MEKF"
RESTORE_MEKF_NONFINITE_RECOVERY = "Restore MEKF non-finite recovery" RESTORE_MEKF_NONFINITE_RECOVERY = "Restore MEKF non-finite recovery"
UPDATE_TLE = "Update TLE"
SET_PARAMETER_SCALAR = "Set Scalar Parameter" SET_PARAMETER_SCALAR = "Set Scalar Parameter"
SET_PARAMETER_VECTOR = "Set Vector Parameter" SET_PARAMETER_VECTOR = "Set Vector Parameter"
SET_PARAMETER_MATRIX = "Set Matrix Parameter" SET_PARAMETER_MATRIX = "Set Matrix Parameter"
@ -159,6 +196,9 @@ class Info:
REQUEST_ACT_CMD_HK = "Request Actuator Commands HK" REQUEST_ACT_CMD_HK = "Request Actuator Commands HK"
ENABLE_ACT_CMD_HK = "Enable Actuator Commands HK data generation" ENABLE_ACT_CMD_HK = "Enable Actuator Commands HK data generation"
DISABLE_ACT_CMD_HK = "Disable Actuator Commands HK data generation" DISABLE_ACT_CMD_HK = "Disable Actuator Commands HK data generation"
REQUEST_FUSED_ROT_RATE_HK = "Request Fused Rotational Rates HK"
ENABLE_FUSED_ROT_RATE_HK = "Enable Fused Rotational Rates HK data generation"
DISABLE_FUSED_ROT_RATE_HK = "Disable Fused Rotational Rates HK data generation"
PERFORM_MGM_CALIBRATION = False PERFORM_MGM_CALIBRATION = False
@ -190,6 +230,7 @@ def acs_cmd_defs(defs: TmtcDefinitionWrapper):
keys=OpCodes.RESTORE_MEKF_NONFINITE_RECOVERY, keys=OpCodes.RESTORE_MEKF_NONFINITE_RECOVERY,
info=Info.RESTORE_MEKF_NONFINITE_RECOVERY, info=Info.RESTORE_MEKF_NONFINITE_RECOVERY,
) )
oce.add(keys=OpCodes.UPDATE_TLE, info=Info.UPDATE_TLE)
oce.add(keys=OpCodes.SET_PARAMETER_SCALAR, info=Info.SET_PARAMETER_SCALAR) oce.add(keys=OpCodes.SET_PARAMETER_SCALAR, info=Info.SET_PARAMETER_SCALAR)
oce.add(keys=OpCodes.SET_PARAMETER_VECTOR, info=Info.SET_PARAMETER_VECTOR) oce.add(keys=OpCodes.SET_PARAMETER_VECTOR, info=Info.SET_PARAMETER_VECTOR)
oce.add(keys=OpCodes.SET_PARAMETER_MATRIX, info=Info.SET_PARAMETER_MATRIX) oce.add(keys=OpCodes.SET_PARAMETER_MATRIX, info=Info.SET_PARAMETER_MATRIX)
@ -223,6 +264,9 @@ def acs_cmd_defs(defs: TmtcDefinitionWrapper):
oce.add(keys=OpCodes.REQUEST_ACT_CMD_HK, info=Info.REQUEST_ACT_CMD_HK) oce.add(keys=OpCodes.REQUEST_ACT_CMD_HK, info=Info.REQUEST_ACT_CMD_HK)
oce.add(keys=OpCodes.ENABLE_ACT_CMD_HK, info=Info.ENABLE_ACT_CMD_HK) oce.add(keys=OpCodes.ENABLE_ACT_CMD_HK, info=Info.ENABLE_ACT_CMD_HK)
oce.add(keys=OpCodes.DISABLE_ACT_CMD_HK, info=Info.DISABLE_ACT_CMD_HK) oce.add(keys=OpCodes.DISABLE_ACT_CMD_HK, info=Info.DISABLE_ACT_CMD_HK)
oce.add(keys=OpCodes.REQUEST_FUSED_ROT_RATE_HK, info=Info.REQUEST_FUSED_ROT_RATE_HK)
oce.add(keys=OpCodes.ENABLE_FUSED_ROT_RATE_HK, info=Info.ENABLE_FUSED_ROT_RATE_HK)
oce.add(keys=OpCodes.DISABLE_FUSED_ROT_RATE_HK, info=Info.DISABLE_FUSED_ROT_RATE_HK)
defs.add_service( defs.add_service(
name=CustomServiceList.ACS_CTRL.value, info="ACS Controller", op_code_entry=oce name=CustomServiceList.ACS_CTRL.value, info="ACS Controller", op_code_entry=oce
) )
@ -275,6 +319,22 @@ def pack_acs_ctrl_command(p: ServiceProviderParams): # noqa C901
q.add_pus_tc( q.add_pus_tc(
create_action_cmd(ACS_CONTROLLER, ActionId.RESTORE_MEKF_NONFINITE_RECOVERY) create_action_cmd(ACS_CONTROLLER, ActionId.RESTORE_MEKF_NONFINITE_RECOVERY)
) )
elif op_code in OpCodes.UPDATE_TLE:
q.add_log_cmd(f"{Info.UPDATE_TLE}")
while True:
line1 = input("Please input the first line of the TLE: ")
if len(line1) == 69:
break
else:
print("The line does not have the required length of 69 characters")
while True:
line2 = input("Please input the second line of the TLE: ")
if len(line2) == 69:
break
else:
print("The line does not have the required length of 69 characters")
tle = line1.encode() + line2.encode()
q.add_pus_tc(create_action_cmd(ACS_CONTROLLER, ActionId.UPDATE_TLE, tle))
elif op_code in OpCodes.SET_PARAMETER_SCALAR: elif op_code in OpCodes.SET_PARAMETER_SCALAR:
q.add_log_cmd(f"{Info.SET_PARAMETER_SCALAR}") q.add_log_cmd(f"{Info.SET_PARAMETER_SCALAR}")
set_acs_ctrl_param_scalar(q) set_acs_ctrl_param_scalar(q)
@ -484,6 +544,26 @@ def pack_acs_ctrl_command(p: ServiceProviderParams): # noqa C901
False, make_sid(ACS_CONTROLLER, SetId.ACTUATOR_CMD_DATA) False, make_sid(ACS_CONTROLLER, SetId.ACTUATOR_CMD_DATA)
) )
) )
elif op_code in OpCodes.REQUEST_FUSED_ROT_RATE_HK:
q.add_log_cmd(Info.REQUEST_FUSED_ROT_RATE_HK)
q.add_pus_tc(
generate_one_hk_command(make_sid(ACS_CONTROLLER, SetId.FUSED_ROT_RATE_DATA))
)
elif op_code in OpCodes.ENABLE_FUSED_ROT_RATE_HK:
interval = float(input("Please specify interval in floating point seconds: "))
q.add_log_cmd(Info.ENABLE_FUSED_ROT_RATE_HK)
cmd_tuple = enable_periodic_hk_command_with_interval(
False, make_sid(ACS_CONTROLLER, SetId.FUSED_ROT_RATE_DATA), interval
)
q.add_pus_tc(cmd_tuple[0])
q.add_pus_tc(cmd_tuple[1])
elif op_code in OpCodes.DISABLE_FUSED_ROT_RATE_HK:
q.add_log_cmd(Info.DISABLE_FUSED_ROT_RATE_HK)
q.add_pus_tc(
disable_periodic_hk_command(
False, make_sid(ACS_CONTROLLER, SetId.FUSED_ROT_RATE_DATA)
)
)
else: else:
logging.getLogger(__name__).info(f"Unknown op code {op_code}") logging.getLogger(__name__).info(f"Unknown op code {op_code}")
@ -491,8 +571,8 @@ def pack_acs_ctrl_command(p: ServiceProviderParams): # noqa C901
def set_acs_ctrl_param_scalar(q: DefaultPusQueueHelper): def set_acs_ctrl_param_scalar(q: DefaultPusQueueHelper):
pt = int( pt = int(
input( input(
'Specify parameter type to set {0: "uint8", 1: "uint16", 2: "int32", 3: "float", ' 'Specify parameter type to set {0: "uint8", 1: "uint16", 2: "int32", 3:'
'4: "double"}: ' ' "float", 4: "double"}: '
) )
) )
sid = int(input("Specify parameter struct ID to set: ")) sid = int(input("Specify parameter struct ID to set: "))
@ -699,6 +779,8 @@ def handle_acs_ctrl_hk_data(
handle_ctrl_val_data(pw, hk_data) handle_ctrl_val_data(pw, hk_data)
case SetId.ACTUATOR_CMD_DATA: case SetId.ACTUATOR_CMD_DATA:
handle_act_cmd_data(pw, hk_data) handle_act_cmd_data(pw, hk_data)
case SetId.FUSED_ROT_RATE_DATA:
handle_fused_rot_rate_data(pw, hk_data)
def handle_acs_ctrl_sus_raw_data(pw: PrintWrapper, hk_data: bytes): def handle_acs_ctrl_sus_raw_data(pw: PrintWrapper, hk_data: bytes):
@ -726,8 +808,8 @@ def handle_acs_ctrl_sus_raw_data(pw: PrintWrapper, hk_data: bytes):
def handle_acs_ctrl_sus_processed_data(pw: PrintWrapper, hk_data: bytes): def handle_acs_ctrl_sus_processed_data(pw: PrintWrapper, hk_data: bytes):
if len(hk_data) < 3 * 4 * 12 + 3 * 8 * 3: if len(hk_data) < 3 * 4 * 12 + 3 * 8 * 3:
pw.dlog( pw.dlog(
f"SUS Processed dataset with size {len(hk_data)} does not have expected size" f"SUS Processed dataset with size {len(hk_data)} does not have expected"
f" of {3 * 4 * 12 + 3 * 8 * 3} bytes" f" size of {3 * 4 * 12 + 3 * 8 * 3} bytes"
) )
return return
current_idx = 0 current_idx = 0
@ -764,7 +846,8 @@ def handle_raw_mgm_data(pw: PrintWrapper, hk_data: bytes):
if len(hk_data) < 61: if len(hk_data) < 61:
pw.dlog( pw.dlog(
f"ACS CTRL HK: MGM HK data with length {len(hk_data)} shorter than expected 61 bytes" f"ACS CTRL HK: MGM HK data with length {len(hk_data)} shorter than expected"
" 61 bytes"
) )
pw.dlog(f"Raw Data: {hk_data.hex(sep=',')}") pw.dlog(f"Raw Data: {hk_data.hex(sep=',')}")
return return
@ -930,11 +1013,13 @@ def handle_gyr_data_processed(pw: PrintWrapper, hk_data: bytes):
def handle_gps_data_processed(pw: PrintWrapper, hk_data: bytes): def handle_gps_data_processed(pw: PrintWrapper, hk_data: bytes):
pw.dlog("Received GPS Processed Set") pw.dlog("Received GPS Processed Set")
fmt_source = "!B"
fmt_scalar = "!d" fmt_scalar = "!d"
fmt_vec = "!ddd" fmt_vec = "!ddd"
inc_len_source = struct.calcsize(fmt_source)
inc_len_scalar = struct.calcsize(fmt_scalar) inc_len_scalar = struct.calcsize(fmt_scalar)
inc_len_vec = struct.calcsize(fmt_vec) inc_len_vec = struct.calcsize(fmt_vec)
if len(hk_data) < 2 * inc_len_scalar + 2 * inc_len_vec: if len(hk_data) < 3 * inc_len_scalar + 2 * inc_len_vec + inc_len_source:
pw.dlog("Received HK set too small") pw.dlog("Received HK set too small")
return return
current_idx = 0 current_idx = 0
@ -973,12 +1058,20 @@ def handle_gps_data_processed(pw: PrintWrapper, hk_data: bytes):
) )
] ]
current_idx += inc_len_vec current_idx += inc_len_vec
source = struct.unpack(
fmt_source, hk_data[current_idx : current_idx + inc_len_source]
)[0]
current_idx += inc_len_source
if GPS_COURCE_DICT.get(source) is not None:
pw.dlog(f"GPS Source: {GPS_COURCE_DICT[source]}")
else:
pw.dlog(f"'GPS Source (key unknown)': {source}")
pw.dlog(f"GPS Latitude: {lat} [deg]") pw.dlog(f"GPS Latitude: {lat} [deg]")
pw.dlog(f"GPS Longitude: {long} [deg]") pw.dlog(f"GPS Longitude: {long} [deg]")
pw.dlog(f"GPS Altitude: {alt} [m]") pw.dlog(f"GPS Altitude: {alt} [m]")
pw.dlog(f"GPS Position: {pos} [m]") pw.dlog(f"GPS Position: {pos} [m]")
pw.dlog(f"GPS Velocity: {velo} [m/s]") pw.dlog(f"GPS Velocity: {velo} [m/s]")
FsfwTmTcPrinter.get_validity_buffer(hk_data[current_idx:], num_vars=5) FsfwTmTcPrinter.get_validity_buffer(hk_data[current_idx:], num_vars=6)
def handle_mekf_data(pw: PrintWrapper, hk_data: bytes): def handle_mekf_data(pw: PrintWrapper, hk_data: bytes):
@ -1026,17 +1119,6 @@ def handle_mekf_data(pw: PrintWrapper, hk_data: bytes):
def handle_ctrl_val_data(pw: PrintWrapper, hk_data: bytes): def handle_ctrl_val_data(pw: PrintWrapper, hk_data: bytes):
safe_strat = {
0: "OFF",
1: "NO_MAG_FIELD_FOR_CONTROL",
2: "NO_SENSORS_FOR_CONTROL",
10: "ACTIVE_MEKF",
11: "WITHOUT_MEKF",
12: "ECLIPSE_DAMPING",
13: "ECLIPSE_IDELING",
20: "DETUMBLE_FULL",
21: "DETUMBLE_DETERIORATED",
}
pw.dlog("Received CTRL Values Set") pw.dlog("Received CTRL Values Set")
fmt_strat = "!B" fmt_strat = "!B"
fmt_quat = "!dddd" fmt_quat = "!dddd"
@ -1082,8 +1164,8 @@ def handle_ctrl_val_data(pw: PrintWrapper, hk_data: bytes):
) )
] ]
current_idx += inc_len_vec current_idx += inc_len_vec
if safe_strat.get(strat) is not None: if CTRL_STRAT_DICT.get(strat) is not None:
pw.dlog(f"{'Safe Ctrl Strategy'.ljust(25)}: {safe_strat[strat]}") pw.dlog(f"{'Safe Ctrl Strategy'.ljust(25)}: {CTRL_STRAT_DICT[strat]}")
else: else:
pw.dlog(f"{'Safe Ctrl Strategy (key unknown)'.ljust(25)}: {strat}") pw.dlog(f"{'Safe Ctrl Strategy (key unknown)'.ljust(25)}: {strat}")
pw.dlog(f"Control Values Target Quaternion: {tgt_quat}") pw.dlog(f"Control Values Target Quaternion: {tgt_quat}")
@ -1132,6 +1214,41 @@ def handle_act_cmd_data(pw: PrintWrapper, hk_data: bytes):
FsfwTmTcPrinter.get_validity_buffer(hk_data[current_idx:], num_vars=3) FsfwTmTcPrinter.get_validity_buffer(hk_data[current_idx:], num_vars=3)
def handle_fused_rot_rate_data(pw: PrintWrapper, hk_data: bytes):
pw.dlog("Received Fused Rotation Rates Data Set")
fmt_vec3_double = "!ddd"
inc_len_vec3_double = struct.calcsize(fmt_vec3_double)
if len(hk_data) < 3 * inc_len_vec3_double:
pw.dlog("Received HK set too small")
return
current_idx = 0
rot_rate_orthogonal = [
f"{val*180/math.pi:8.3f}"
for val in struct.unpack(
fmt_vec3_double, hk_data[current_idx : current_idx + inc_len_vec3_double]
)
]
current_idx += inc_len_vec3_double
rot_rate_parallel = [
f"{val*180/math.pi:8.3f}"
for val in struct.unpack(
fmt_vec3_double, hk_data[current_idx : current_idx + inc_len_vec3_double]
)
]
current_idx += inc_len_vec3_double
rot_rate_total = [
f"{val*180/math.pi:8.3f}"
for val in struct.unpack(
fmt_vec3_double, hk_data[current_idx : current_idx + inc_len_vec3_double]
)
]
current_idx += inc_len_vec3_double
pw.dlog(f"Fused Rotational Rate Orthogonal: {rot_rate_orthogonal} [deg/s]")
pw.dlog(f"Fused Rotational Rate Parallel: {rot_rate_parallel} [deg/s]")
pw.dlog(f"Fused Rotational Rate Total: {rot_rate_total} [deg/s]")
FsfwTmTcPrinter.get_validity_buffer(hk_data[current_idx:], num_vars=3)
def perform_mgm_calibration( # noqa C901: Complexity okay def perform_mgm_calibration( # noqa C901: Complexity okay
pw: PrintWrapper, mgm_tuple: Tuple pw: PrintWrapper, mgm_tuple: Tuple
): # noqa C901: Complexity okay ): # noqa C901: Complexity okay
@ -1160,8 +1277,8 @@ def perform_mgm_calibration( # noqa C901: Complexity okay
reply = CALIBR_SOCKET.recv(1024) reply = CALIBR_SOCKET.recv(1024)
if len(reply) != 2: if len(reply) != 2:
pw.dlog( pw.dlog(
f"MGM calibration: Reply received command magnetometer_field has invalid " "MGM calibration: Reply received command magnetometer_field has"
f"length {len(reply)}" f" invalid length {len(reply)}"
) )
return return
else: else:

View File

@ -12,45 +12,59 @@ from tmtccmd.tc import DefaultPusQueueHelper
from tmtccmd.tc.pus_3_fsfw_hk import ( from tmtccmd.tc.pus_3_fsfw_hk import (
make_sid, make_sid,
create_request_one_hk_command, create_request_one_hk_command,
create_enable_periodic_hk_command_with_interval, create_enable_periodic_hk_command_with_interval_with_diag,
create_disable_periodic_hk_command, create_disable_periodic_hk_command_with_diag,
) )
from tmtccmd.fsfw.tmtc_printer import FsfwTmTcPrinter from tmtccmd.fsfw.tmtc_printer import FsfwTmTcPrinter
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
class GpsInfo:
MAX_SATELLITES = 30
class OpCode: class OpCode:
OFF = "off" OFF = "off"
ON = "on" ON = "on"
REQ_OS_HK = ["hk"] REQ_CORE_HK = ["core_hk_request"]
ENABLE_HK = ["enable_hk"] ENABLE_CORE_HK = ["core_hk_enable"]
DISABLE_HK = ["disable_hk"] DISABLE_CORE_HK = ["core_hk_disable"]
REQ_SKYVIEW_HK = ["skyview_hk_request"]
ENABLE_SKYVIEW_HK = ["skyview_hk_enable"]
DISABLE_SKYVIEW_HK = ["skyview_hk_disable"]
RESET_GNSS = ["reset"] RESET_GNSS = ["reset"]
class Info: class Info:
OFF = "Off" OFF = "Off"
ON = "On" ON = "On"
REQ_OS_HK = "Request One-Shot HK" REQ_CORE_HK = "Request Core HK"
ENABLE_HK = "Enable HK" ENABLE_CORE_HK = "Enable Core HK"
DISABLE_HK = "Disable HK" DISABLE_CORE_HK = "Disable Core HK"
REQ_SKYVIEW_HK = "Request Skyview HK"
ENABLE_SKYVIEW_HK = "Enable Skyview HK"
DISABLE_SKYVIEW_HK = "Disable Skyview HK"
RESET_GNSS = "Reset GNSS using reset pin" RESET_GNSS = "Reset GNSS using reset pin"
class SetId(enum.IntEnum): class SetId(enum.IntEnum):
HK = 0 CORE_HK = 0
SKYVIEW_HK = 1
@tmtc_definitions_provider @tmtc_definitions_provider
def add_gps_cmds(defs: TmtcDefinitionWrapper): def add_gps_cmds(defs: TmtcDefinitionWrapper):
oce = OpCodeEntry() oce = OpCodeEntry()
oce.add(keys=OpCode.RESET_GNSS, info=Info.RESET_GNSS)
oce.add(keys=OpCode.REQ_OS_HK, info=Info.REQ_OS_HK)
oce.add(keys=OpCode.ENABLE_HK, info=Info.ENABLE_HK)
oce.add(keys=OpCode.DISABLE_HK, info=Info.DISABLE_HK)
oce.add(keys=OpCode.OFF, info=Info.OFF) oce.add(keys=OpCode.OFF, info=Info.OFF)
oce.add(keys=OpCode.ON, info=Info.ON) oce.add(keys=OpCode.ON, info=Info.ON)
oce.add(keys=OpCode.RESET_GNSS, info=Info.RESET_GNSS)
oce.add(keys=OpCode.REQ_CORE_HK, info=Info.REQ_CORE_HK)
oce.add(keys=OpCode.ENABLE_CORE_HK, info=Info.ENABLE_CORE_HK)
oce.add(keys=OpCode.DISABLE_CORE_HK, info=Info.DISABLE_CORE_HK)
oce.add(keys=OpCode.REQ_SKYVIEW_HK, info=Info.REQ_SKYVIEW_HK)
oce.add(keys=OpCode.ENABLE_SKYVIEW_HK, info=Info.ENABLE_SKYVIEW_HK)
oce.add(keys=OpCode.DISABLE_SKYVIEW_HK, info=Info.DISABLE_SKYVIEW_HK)
defs.add_service( defs.add_service(
name=CustomServiceList.GPS_CTRL.value, name=CustomServiceList.GPS_CTRL.value,
info="GPS/GNSS Controller", info="GPS/GNSS Controller",
@ -58,27 +72,64 @@ def add_gps_cmds(defs: TmtcDefinitionWrapper):
) )
def pack_gps_command(object_id: bytes, q: DefaultPusQueueHelper, op_code: str): def pack_gps_command( # noqa: C901
sid = make_sid(object_id=object_id, set_id=SetId.HK) object_id: bytes, q: DefaultPusQueueHelper, op_code: str
): # noqa: C901:
if op_code in OpCode.RESET_GNSS: if op_code in OpCode.RESET_GNSS:
# TODO: This needs to be re-implemented # TODO: This needs to be re-implemented
_LOGGER.warning("Reset pin handling needs to be re-implemented") _LOGGER.warning("Reset pin handling needs to be re-implemented")
if op_code in OpCode.ENABLE_HK: if op_code in OpCode.ENABLE_CORE_HK:
interval = float(input("Please specify interval in floating point seconds: ")) interval = float(input("Please specify interval in floating point seconds: "))
if interval <= 0: if interval <= 0:
raise ValueError("invalid interval") raise ValueError("invalid interval")
q.add_log_cmd(f"GPS: {Info.ENABLE_HK}") q.add_log_cmd(f"GPS: {Info.ENABLE_CORE_HK}")
cmds = create_enable_periodic_hk_command_with_interval( cmds = create_enable_periodic_hk_command_with_interval_with_diag(
diag=False, sid=sid, interval_seconds=interval diag=False,
sid=make_sid(object_id=object_id, set_id=SetId.CORE_HK),
interval_seconds=interval,
) )
for cmd in cmds: for cmd in cmds:
q.add_pus_tc(cmd) q.add_pus_tc(cmd)
if op_code in OpCode.DISABLE_HK: if op_code in OpCode.DISABLE_CORE_HK:
q.add_log_cmd(f"gps: {Info.DISABLE_HK}") q.add_log_cmd(f"gps: {Info.DISABLE_CORE_HK}")
q.add_pus_tc(create_disable_periodic_hk_command(diag=False, sid=sid)) q.add_pus_tc(
if op_code in OpCode.REQ_OS_HK: create_disable_periodic_hk_command_with_diag(
q.add_log_cmd(f"GPS: {Info.REQ_OS_HK}") diag=False, sid=make_sid(object_id=object_id, set_id=SetId.CORE_HK)
q.add_pus_tc(create_request_one_hk_command(sid=sid)) )
)
if op_code in OpCode.REQ_CORE_HK:
q.add_log_cmd(f"GPS: {Info.REQ_CORE_HK}")
q.add_pus_tc(
create_request_one_hk_command(
sid=make_sid(object_id=object_id, set_id=SetId.CORE_HK)
)
)
if op_code in OpCode.ENABLE_SKYVIEW_HK:
interval = float(input("Please specify interval in floating point seconds: "))
if interval <= 0:
raise ValueError("invalid interval")
q.add_log_cmd(f"GPS: {Info.ENABLE_SKYVIEW_HK}")
cmds = create_enable_periodic_hk_command_with_interval_with_diag(
diag=False,
sid=make_sid(object_id=object_id, set_id=SetId.SKYVIEW_HK),
interval_seconds=interval,
)
for cmd in cmds:
q.add_pus_tc(cmd)
if op_code in OpCode.DISABLE_SKYVIEW_HK:
q.add_log_cmd(f"gps: {Info.DISABLE_SKYVIEW_HK}")
q.add_pus_tc(
create_disable_periodic_hk_command_with_diag(
diag=False, sid=make_sid(object_id=object_id, set_id=SetId.SKYVIEW_HK)
)
)
if op_code in OpCode.REQ_SKYVIEW_HK:
q.add_log_cmd(f"GPS: {Info.REQ_SKYVIEW_HK}")
q.add_pus_tc(
create_request_one_hk_command(
sid=make_sid(object_id=object_id, set_id=SetId.SKYVIEW_HK)
)
)
if op_code in OpCode.ON: if op_code in OpCode.ON:
q.add_log_cmd(f"GPS: {Info.ON}") q.add_log_cmd(f"GPS: {Info.ON}")
q.add_pus_tc(create_mode_command(object_id, Mode.ON, 0)) q.add_pus_tc(create_mode_command(object_id, Mode.ON, 0))
@ -87,8 +138,27 @@ def pack_gps_command(object_id: bytes, q: DefaultPusQueueHelper, op_code: str):
q.add_pus_tc(create_mode_command(object_id, Mode.OFF, 0)) q.add_pus_tc(create_mode_command(object_id, Mode.OFF, 0))
def handle_gps_data(pw: PrintWrapper, hk_data: bytes): def handle_gps_data(
pw.dlog(f"Received GPS data, HK data length {len(hk_data)}") pw: PrintWrapper,
set_id: int,
hk_data: bytes,
packet_time: datetime.datetime,
):
pw.ilog(_LOGGER, f"Received GPS CTRL HK with packet time {packet_time}")
match set_id:
case SetId.CORE_HK:
handle_core_data(pw, hk_data)
case SetId.SKYVIEW_HK:
handle_skyview_data(pw, hk_data)
def handle_core_data(pw: PrintWrapper, hk_data: bytes):
if len(hk_data) < 4 * 8 + 4 + 2 + 8:
pw.dlog(
f"GPS Core dataset with size {len(hk_data)} does not have expected size"
f" of {4*8+4+2+8} bytes"
)
return
current_idx = 0 current_idx = 0
fmt_str = "!ddddBBBHBBBBBI" fmt_str = "!ddddBBBHBBBBBI"
inc_len = struct.calcsize(fmt_str) inc_len = struct.calcsize(fmt_str)
@ -126,3 +196,65 @@ def handle_gps_data(pw: PrintWrapper, hk_data: bytes):
FsfwTmTcPrinter.get_validity_buffer( FsfwTmTcPrinter.get_validity_buffer(
validity_buffer=hk_data[current_idx:], num_vars=14 validity_buffer=hk_data[current_idx:], num_vars=14
) )
def handle_skyview_data(pw: PrintWrapper, hk_data: bytes):
data_length = 8 + GpsInfo.MAX_SATELLITES * (8 + 3 * 2 + 1)
if len(hk_data) < data_length:
pw.dlog(
f"GPS Skyview dataset with size {len(hk_data)} does not have expected size"
f" of {data_length} bytes"
)
return
current_idx = 0
fmt_str_unix = "!d"
fmt_str_int16 = "!" + "h" * GpsInfo.MAX_SATELLITES
fmt_str_double = "!" + "d" * GpsInfo.MAX_SATELLITES
fmt_str_uint8 = "!" + "B" * GpsInfo.MAX_SATELLITES
inc_len_unix = struct.calcsize(fmt_str_unix)
inc_len_int16 = struct.calcsize(fmt_str_int16)
inc_len_double = struct.calcsize(fmt_str_double)
inc_len_uint8 = struct.calcsize(fmt_str_uint8)
unix = struct.unpack(
fmt_str_unix, hk_data[current_idx : current_idx + inc_len_unix]
)[0]
current_idx += inc_len_unix
prn_id = struct.unpack(
fmt_str_int16, hk_data[current_idx : current_idx + inc_len_int16]
)
current_idx += inc_len_int16
azimuth = struct.unpack(
fmt_str_int16, hk_data[current_idx : current_idx + inc_len_int16]
)
current_idx += inc_len_int16
elevation = struct.unpack(
fmt_str_int16, hk_data[current_idx : current_idx + inc_len_int16]
)
current_idx += inc_len_int16
signal_to_noise = struct.unpack(
fmt_str_double, hk_data[current_idx : current_idx + inc_len_double]
)
current_idx += inc_len_double
used = struct.unpack(
fmt_str_uint8, hk_data[current_idx : current_idx + inc_len_uint8]
)
current_idx += inc_len_uint8
pw.dlog(f"Skyview Time: {unix} unix-sec")
pw.dlog(
"{:<8} {:<8} {:<8} {:<8} {:<8}".format(
"PRN_ID", "AZ [°]", "EL [°]", "S2N [dBW]", "USED"
)
)
for idx in range(GpsInfo.MAX_SATELLITES):
pw.dlog(
"{:<8} {:<8} {:<8} {:<8} {:<8}".format(
prn_id[idx],
azimuth[idx],
elevation[idx],
signal_to_noise[idx],
used[idx],
)
)
FsfwTmTcPrinter.get_validity_buffer(
validity_buffer=hk_data[current_idx:], num_vars=6
)

View File

@ -61,7 +61,7 @@ GYR_SEL_DICT = {
def handle_gyr_cmd(q: DefaultPusQueueHelper, op_code: str): def handle_gyr_cmd(q: DefaultPusQueueHelper, op_code: str):
print("Please select the Gyro Device") print("Please select the Gyro Device")
for (k, v) in GYR_SEL_DICT.items(): for k, v in GYR_SEL_DICT.items():
print(f"{k}: {v[0]}") print(f"{k}: {v[0]}")
sel_idx = int(input("Select gyro device by index: ")) sel_idx = int(input("Select gyro device by index: "))
gyr_info = GYR_SEL_DICT[GyrSel(sel_idx)] gyr_info = GYR_SEL_DICT[GyrSel(sel_idx)]

View File

@ -24,8 +24,8 @@ from tmtccmd.tc.pus_3_fsfw_hk import (
generate_one_diag_command, generate_one_diag_command,
generate_one_hk_command, generate_one_hk_command,
create_request_one_diag_command, create_request_one_diag_command,
create_disable_periodic_hk_command, create_enable_periodic_hk_command_with_interval_with_diag,
create_enable_periodic_hk_command_with_interval, create_disable_periodic_hk_command_with_diag,
) )
from tmtccmd.tc.pus_200_fsfw_mode import pack_mode_data, Mode from tmtccmd.tc.pus_200_fsfw_mode import pack_mode_data, Mode
from tmtccmd.util import ObjectIdU32 from tmtccmd.util import ObjectIdU32
@ -227,12 +227,13 @@ def pack_imtq_test_into( # noqa C901
duration = int( duration = int(
input( input(
f"Specify torque duration [range [0, {pow(2, 16) - 1}, " f"Specify torque duration [range [0, {pow(2, 16) - 1}, "
f"0 for continuous generation until update]: " "0 for continuous generation until update]: "
) )
) )
dur_str = "infinite" if duration == 0 else str(duration) dur_str = "infinite" if duration == 0 else str(duration)
q.add_log_cmd( q.add_log_cmd(
f"IMTQ: Commanding dipole X={x_dipole}, Y={y_dipole}, Z={y_dipole}, duration={dur_str}" f"IMTQ: Commanding dipole X={x_dipole}, Y={y_dipole}, Z={y_dipole},"
f" duration={dur_str}"
) )
q.add_pus_tc( q.add_pus_tc(
pack_dipole_command( pack_dipole_command(
@ -248,7 +249,7 @@ def pack_imtq_test_into( # noqa C901
if op_code == OpCode.ENABLE_ENG_HK_NO_TORQUE: if op_code == OpCode.ENABLE_ENG_HK_NO_TORQUE:
q.add_log_cmd("IMTQ: Enable ENG HK") q.add_log_cmd("IMTQ: Enable ENG HK")
interval = float(input("Please enter collection interval in seconds: ")) interval = float(input("Please enter collection interval in seconds: "))
cmds = create_enable_periodic_hk_command_with_interval( cmds = create_enable_periodic_hk_command_with_interval_with_diag(
diag=True, diag=True,
sid=make_sid(object_id.as_bytes, ImtqSetId.ENG_HK_NO_TORQUE), sid=make_sid(object_id.as_bytes, ImtqSetId.ENG_HK_NO_TORQUE),
interval_seconds=interval, interval_seconds=interval,
@ -258,7 +259,7 @@ def pack_imtq_test_into( # noqa C901
if op_code == OpCode.DISABLE_ENG_HK_NO_TORQUE: if op_code == OpCode.DISABLE_ENG_HK_NO_TORQUE:
q.add_log_cmd("IMTQ: Disable ENG HK (No Torque)") q.add_log_cmd("IMTQ: Disable ENG HK (No Torque)")
q.add_pus_tc( q.add_pus_tc(
create_disable_periodic_hk_command( create_disable_periodic_hk_command_with_diag(
True, make_sid(object_id.as_bytes, ImtqSetId.ENG_HK_NO_TORQUE) True, make_sid(object_id.as_bytes, ImtqSetId.ENG_HK_NO_TORQUE)
) )
) )
@ -275,7 +276,7 @@ def pack_imtq_test_into( # noqa C901
if op_code == OpCode.ENABLE_ENG_HK_WITH_TORQUE: if op_code == OpCode.ENABLE_ENG_HK_WITH_TORQUE:
q.add_log_cmd("IMTQ: Enable ENG HK with torque") q.add_log_cmd("IMTQ: Enable ENG HK with torque")
interval = float(input("Please enter collection interval in seconds: ")) interval = float(input("Please enter collection interval in seconds: "))
cmds = create_enable_periodic_hk_command_with_interval( cmds = create_enable_periodic_hk_command_with_interval_with_diag(
diag=True, diag=True,
sid=make_sid(object_id.as_bytes, ImtqSetId.ENG_HK_SET_WITH_TORQUE), sid=make_sid(object_id.as_bytes, ImtqSetId.ENG_HK_SET_WITH_TORQUE),
interval_seconds=interval, interval_seconds=interval,
@ -285,7 +286,7 @@ def pack_imtq_test_into( # noqa C901
if op_code == OpCode.DISABLE_ENG_HK_WITH_TORQUE: if op_code == OpCode.DISABLE_ENG_HK_WITH_TORQUE:
q.add_log_cmd("IMTQ: Disable ENG HK with Torque") q.add_log_cmd("IMTQ: Disable ENG HK with Torque")
q.add_pus_tc( q.add_pus_tc(
create_disable_periodic_hk_command( create_disable_periodic_hk_command_with_diag(
True, make_sid(object_id.as_bytes, ImtqSetId.ENG_HK_SET_WITH_TORQUE) True, make_sid(object_id.as_bytes, ImtqSetId.ENG_HK_SET_WITH_TORQUE)
) )
) )
@ -320,14 +321,14 @@ def pack_imtq_test_into( # noqa C901
if op_code == OpCode.DISABLE_MGM_RAW_NO_TORQUE: if op_code == OpCode.DISABLE_MGM_RAW_NO_TORQUE:
q.add_log_cmd("IMTQ: Disable MGM RAW HK (No Torque)") q.add_log_cmd("IMTQ: Disable MGM RAW HK (No Torque)")
q.add_pus_tc( q.add_pus_tc(
create_disable_periodic_hk_command( create_disable_periodic_hk_command_with_diag(
True, make_sid(object_id.as_bytes, ImtqSetId.RAW_MTM_NO_TORQUE) True, make_sid(object_id.as_bytes, ImtqSetId.RAW_MTM_NO_TORQUE)
) )
) )
if op_code == OpCode.ENABLE_MGM_RAW_NO_TORQUE: if op_code == OpCode.ENABLE_MGM_RAW_NO_TORQUE:
q.add_log_cmd("IMTQ: Enable MGM RAW HK (No Torque)") q.add_log_cmd("IMTQ: Enable MGM RAW HK (No Torque)")
interval = float(input("Please enter collection interval in seconds: ")) interval = float(input("Please enter collection interval in seconds: "))
cmds = create_enable_periodic_hk_command_with_interval( cmds = create_enable_periodic_hk_command_with_interval_with_diag(
diag=True, diag=True,
sid=make_sid(object_id.as_bytes, ImtqSetId.RAW_MTM_NO_TORQUE), sid=make_sid(object_id.as_bytes, ImtqSetId.RAW_MTM_NO_TORQUE),
interval_seconds=interval, interval_seconds=interval,
@ -346,7 +347,7 @@ def pack_imtq_test_into( # noqa C901
if op_code == OpCode.ENABLE_MGM_RAW_WITH_TORQUE: if op_code == OpCode.ENABLE_MGM_RAW_WITH_TORQUE:
q.add_log_cmd("IMTQ: Enable MGM RAW HK (No Torque)") q.add_log_cmd("IMTQ: Enable MGM RAW HK (No Torque)")
interval = float(input("Please enter collection interval in seconds: ")) interval = float(input("Please enter collection interval in seconds: "))
cmds = create_enable_periodic_hk_command_with_interval( cmds = create_enable_periodic_hk_command_with_interval_with_diag(
diag=True, diag=True,
sid=make_sid(object_id.as_bytes, ImtqSetId.RAW_MTM_WITH_TORQUE), sid=make_sid(object_id.as_bytes, ImtqSetId.RAW_MTM_WITH_TORQUE),
interval_seconds=interval, interval_seconds=interval,
@ -356,7 +357,7 @@ def pack_imtq_test_into( # noqa C901
if op_code == OpCode.DISABLE_MGM_RAW_WITH_TORQUE: if op_code == OpCode.DISABLE_MGM_RAW_WITH_TORQUE:
q.add_log_cmd("IMTQ: Disable MGM RAW HK (No Torque)") q.add_log_cmd("IMTQ: Disable MGM RAW HK (No Torque)")
q.add_pus_tc( q.add_pus_tc(
create_disable_periodic_hk_command( create_disable_periodic_hk_command_with_diag(
True, make_sid(object_id.as_bytes, ImtqSetId.RAW_MTM_WITH_TORQUE) True, make_sid(object_id.as_bytes, ImtqSetId.RAW_MTM_WITH_TORQUE)
) )
) )
@ -388,7 +389,8 @@ def pack_dipole_command(
duration = int(round(duration)) duration = int(round(duration))
if duration < 0 or duration > pow(2, 16) - 1: if duration < 0 or duration > pow(2, 16) - 1:
raise ValueError( raise ValueError(
f"Duration in ms of {duration} smaller than 0 or larger than allowed {pow(2, 16) - 1}" f"Duration in ms of {duration} smaller than 0 or larger than allowed"
f" {pow(2, 16) - 1}"
) )
command += struct.pack("!h", x_dipole) command += struct.pack("!h", x_dipole)
command += struct.pack("!h", y_dipole) command += struct.pack("!h", y_dipole)
@ -400,7 +402,8 @@ def pack_dipole_command(
def raise_dipole_error(dipole_str: str, value: int): def raise_dipole_error(dipole_str: str, value: int):
raise ValueError( raise ValueError(
f"{dipole_str} {value} negative or larger than maximum allowed 2000 * 10^-4*Am^2" f"{dipole_str} {value} negative or larger than maximum allowed 2000 *"
" 10^-4*Am^2"
) )

View File

@ -49,7 +49,7 @@ MGM_SEL_DICT = {
def handle_mgm_cmd(q: DefaultPusQueueHelper, op_code: str): def handle_mgm_cmd(q: DefaultPusQueueHelper, op_code: str):
print("Please select the MGM Device") print("Please select the MGM Device")
for (k, v) in MGM_SEL_DICT.items(): for k, v in MGM_SEL_DICT.items():
print(f"{k}: {v[0]}") print(f"{k}: {v[0]}")
sel_idx = int(input("Select MGM device by index: ")) sel_idx = int(input("Select MGM device by index: "))
mgm_info = MGM_SEL_DICT[MgmSel(sel_idx)] mgm_info = MGM_SEL_DICT[MgmSel(sel_idx)]

View File

@ -261,14 +261,12 @@ def pack_set_speed_command(
if speed > 0: if speed > 0:
if speed < 1000 or speed > 65000: if speed < 1000 or speed > 65000:
raise ValueError( raise ValueError(
"Invalid RW speed specified. " "Invalid RW speed specified. Allowed range is [1000, 65000] 0.1 * RPM"
"Allowed range is [1000, 65000] 0.1 * RPM"
) )
elif speed < 0: elif speed < 0:
if speed < -65000 or speed > -1000: if speed < -65000 or speed > -1000:
raise ValueError( raise ValueError(
"Invalid RW speed specified. " "Invalid RW speed specified. Allowed range is [-65000, -1000] 0.1 * RPM"
"Allowed range is [-65000, -1000] 0.1 * RPM"
) )
else: else:
# Speed is 0 # Speed is 0
@ -290,7 +288,6 @@ def pack_set_speed_command(
def handle_rw_hk_data( def handle_rw_hk_data(
pw: PrintWrapper, object_id: ObjectIdU32, set_id: int, hk_data: bytes pw: PrintWrapper, object_id: ObjectIdU32, set_id: int, hk_data: bytes
): ):
current_idx = 0 current_idx = 0
if set_id == RwSetId.STATUS_SET_ID: if set_id == RwSetId.STATUS_SET_ID:
pw.dlog( pw.dlog(
@ -305,15 +302,16 @@ def handle_rw_hk_data(
speed_rpm = speed / 10.0 speed_rpm = speed / 10.0
ref_speed_rpm = ref_speed / 10.0 ref_speed_rpm = ref_speed / 10.0
pw.dlog( pw.dlog(
f"Temperature {temp} C | Speed {speed_rpm} rpm | Reference Speed {ref_speed_rpm} rpm" f"Temperature {temp} C | Speed {speed_rpm} rpm | Reference Speed"
f" {ref_speed_rpm} rpm"
) )
pw.dlog( pw.dlog(
f"State {state}. 0: Error, 1: Idle, 2: Coasting, 3: Running, speed stable, " f"State {state}. 0: Error, 1: Idle, 2: Coasting, 3: Running, speed stable, "
f"4: Running, speed changing" "4: Running, speed changing"
) )
pw.dlog( pw.dlog(
f"Current Limit Control mode {clc_mode}. 0: Low Current Mode (0.3 A), " f"Current Limit Control mode {clc_mode}. 0: Low Current Mode (0.3 A), "
f"1: High Current Mode (0.6 A)" "1: High Current Mode (0.6 A)"
) )
pw.dlog(FsfwTmTcPrinter.get_validity_buffer(hk_data[current_idx:], 5)) pw.dlog(FsfwTmTcPrinter.get_validity_buffer(hk_data[current_idx:], 5))
if set_id == RwSetId.LAST_RESET: if set_id == RwSetId.LAST_RESET:
@ -362,22 +360,24 @@ def handle_rw_hk_data(
) = struct.unpack(fmt_str, hk_data[current_idx : current_idx + inc_len]) ) = struct.unpack(fmt_str, hk_data[current_idx : current_idx + inc_len])
pw.dlog( pw.dlog(
f"MCU Temperature {mcu_temp} | Pressure Sensore Temperature {pressure_sens_temp} C" f"MCU Temperature {mcu_temp} | Pressure Sensore Temperature"
f" {pressure_sens_temp} C"
) )
pw.dlog(f"Last Reset Status {last_reset_status}") pw.dlog(f"Last Reset Status {last_reset_status}")
pw.dlog( pw.dlog(
f"Current Limit Control mode {clc_mode}. 0: Low Current Mode (0.3 A), " f"Current Limit Control mode {clc_mode}. 0: Low Current Mode (0.3 A), "
f"1: High Current Mode (0.6 A)" "1: High Current Mode (0.6 A)"
) )
pw.dlog(f"Speed {current_speed} rpm | Reference Speed {ref_speed} rpm") pw.dlog(f"Speed {current_speed} rpm | Reference Speed {ref_speed} rpm")
pw.dlog( pw.dlog(
f"State {state}. 0: Error, 1: Idle, 2: Coasting, 3: Running, speed stable, " f"State {state}. 0: Error, 1: Idle, 2: Coasting, 3: Running, speed stable, "
f"4: Running, speed changing" "4: Running, speed changing"
) )
pw.dlog("Number Of Invalid Packets:") pw.dlog("Number Of Invalid Packets:")
pw.dlog("CRC | Length | CMD") pw.dlog("CRC | Length | CMD")
pw.dlog( pw.dlog(
f"{num_invalid_crc_packets} | {num_invalid_len_packets} | {num_invalid_cmd_packets}" f"{num_invalid_crc_packets} | {num_invalid_len_packets} |"
f" {num_invalid_cmd_packets}"
) )
pw.dlog( pw.dlog(
f"Num Of CMD Executed Requests {num_of_cmd_executed_requests} | " f"Num Of CMD Executed Requests {num_of_cmd_executed_requests} | "
@ -389,15 +389,16 @@ def handle_rw_hk_data(
"RegOverrunErrs | TotalErrs" "RegOverrunErrs | TotalErrs"
) )
pw.dlog( pw.dlog(
f"{uart_num_of_bytes_written} | {uart_num_of_bytes_read} | {uart_num_parity_errors} | " f"{uart_num_of_bytes_written} | {uart_num_of_bytes_read} |"
f"{uart_num_noise_errors} | {uart_num_frame_errors} | {uart_num_reg_overrun_errors} | " f" {uart_num_parity_errors} | {uart_num_noise_errors} |"
f"{uart_total_num_errors}" f" {uart_num_frame_errors} | {uart_num_reg_overrun_errors} |"
f" {uart_total_num_errors}"
) )
pw.dlog("SPI COM Info:") pw.dlog("SPI COM Info:")
pw.dlog("NumBytesWritten | NumBytesRead | RegOverrunErrs | TotalErrs") pw.dlog("NumBytesWritten | NumBytesRead | RegOverrunErrs | TotalErrs")
pw.dlog( pw.dlog(
f"{spi_num_bytes_written} | {spi_num_bytes_read} | {spi_num_reg_overrun_errors} | " f"{spi_num_bytes_written} | {spi_num_bytes_read} |"
f"{spi_total_num_errors}" f" {spi_num_reg_overrun_errors} | {spi_total_num_errors}"
) )
if current_idx > 0: if current_idx > 0:
pw.dlog( pw.dlog(

View File

@ -65,7 +65,6 @@ class StarTrackerActionId(enum.IntEnum):
CHANGE_DOWNLOAD_IMAGE = 57 CHANGE_DOWNLOAD_IMAGE = 57
SET_JSON_FILE_NAME = 58 SET_JSON_FILE_NAME = 58
SET_FLASH_READ_FILENAME = 59 SET_FLASH_READ_FILENAME = 59
SET_TIME = 60
DOWNLOAD_DBIMAGE = 61 DOWNLOAD_DBIMAGE = 61
DOWNLOAD_BLOBPIXEL = 62 DOWNLOAD_BLOBPIXEL = 62
DOWNLOAD_FPGA_IMAGE = 63 DOWNLOAD_FPGA_IMAGE = 63
@ -90,6 +89,7 @@ class StarTrackerActionId(enum.IntEnum):
LOG_SUBSCRIPTION = 82 LOG_SUBSCRIPTION = 82
DEBUG_CAMERA = 83 DEBUG_CAMERA = 83
FIRMWARE_UPDATE = 84 FIRMWARE_UPDATE = 84
SET_TIME_FROM_SYS_TIME = 87
class OpCodes: class OpCodes:
@ -104,6 +104,7 @@ class OpCodes:
UPLOAD_IMAGE = "upload_image" UPLOAD_IMAGE = "upload_image"
SET_IMG_PROCESSOR_MODE = "set_img_proc_mode" SET_IMG_PROCESSOR_MODE = "set_img_proc_mode"
FW_UPDATE = "fw_update" FW_UPDATE = "fw_update"
SET_TIME_FROM_SYS_TIME = "set_time"
class Info: class Info:
@ -113,6 +114,7 @@ class Info:
TAKE_IMAGE = "Take Image" TAKE_IMAGE = "Take Image"
SET_IMG_PROCESSOR_MODE = "Set Image Processor Mode" SET_IMG_PROCESSOR_MODE = "Set Image Processor Mode"
FW_UPDATE = "Firmware Update" FW_UPDATE = "Firmware Update"
SET_TIME_FROM_SYS_TIME = "Set time from system time"
class SetId(enum.IntEnum): class SetId(enum.IntEnum):
@ -438,14 +440,9 @@ def pack_star_tracker_commands( # noqa C901
q.add_log_cmd("Star tracker: Get checksum") q.add_log_cmd("Star tracker: Get checksum")
data = pack_checksum_command(obyt) data = pack_checksum_command(obyt)
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data)) q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
if op_code == "38": if op_code == OpCodes.SET_TIME_FROM_SYS_TIME:
q.add_log_cmd("Star tracker: Set time") q.add_log_cmd(Info.SET_TIME_FROM_SYS_TIME)
unix_time = 1640783543 data = obyt + struct.pack("!I", StarTrackerActionId.SET_TIME_FROM_SYS_TIME)
data = (
obyt
+ struct.pack("!I", StarTrackerActionId.SET_TIME)
+ struct.pack("!Q", unix_time)
)
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data)) q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
if op_code == "39": if op_code == "39":
q.add_log_cmd("Star tracker: Download Centroid") q.add_log_cmd("Star tracker: Download Centroid")
@ -485,34 +482,6 @@ def pack_star_tracker_commands( # noqa C901
+ struct.pack("!B", type) + struct.pack("!B", type)
) )
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data)) q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
if op_code == "44":
q.add_log_cmd("Star tracker: Download FPGA Image")
position = int(input("Start position: "))
length = int(input("Size to download: "))
data = (
obyt
+ struct.pack("!I", StarTrackerActionId.DOWNLOAD_FPGA_IMAGE)
+ struct.pack("!I", position)
+ struct.pack("!I", length)
+ bytearray(FileDefs.downloadFpgaImagePath, "utf-8")
)
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
if op_code == "45":
q.add_log_cmd("Star tracker: Change donwload FPGA image file name")
data = (
obyt
+ struct.pack("!I", StarTrackerActionId.CHANGE_FPGA_DOWNLOAD_FILE)
+ bytearray(FileDefs.downloadFpgaImageName, "utf-8")
)
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
if op_code == "46":
q.add_log_cmd("Star tracker: Upload FPGA image")
data = (
obyt
+ struct.pack("!I", StarTrackerActionId.UPLOAD_FPGA_IMAGE)
+ bytearray(FileDefs.uploadFpgaImageName, "utf-8")
)
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
if op_code == "47": if op_code == "47":
q.add_log_cmd("Star tracker: FPGA action") q.add_log_cmd("Star tracker: FPGA action")
id = 3 id = 3
@ -724,7 +693,7 @@ def unpack_time_hk(hk_data: bytes, current_idx: int, pw: PrintWrapper) -> int:
ticks_time_fmt, hk_data[current_idx : current_idx + fmt_len] ticks_time_fmt, hk_data[current_idx : current_idx + fmt_len]
) )
unix_as_dt = datetime.datetime.fromtimestamp( unix_as_dt = datetime.datetime.fromtimestamp(
int(round(unix_time / 10e6)), tz=datetime.timezone.utc int(round(unix_time / 1e6)), tz=datetime.timezone.utc
) )
pw.dlog(f"Ticks: {ticks} | UNIX time: {unix_time}") pw.dlog(f"Ticks: {ticks} | UNIX time: {unix_time}")
pw.dlog(f"UNIX as datetime: {unix_as_dt}") pw.dlog(f"UNIX as datetime: {unix_as_dt}")
@ -887,4 +856,5 @@ def add_str_cmds(defs: TmtcDefinitionWrapper):
oce.add(OpCodes.FW_UPDATE, Info.FW_UPDATE) oce.add(OpCodes.FW_UPDATE, Info.FW_UPDATE)
oce.add("70", "Star Tracker: Disable timestamp generation") oce.add("70", "Star Tracker: Disable timestamp generation")
oce.add("71", "Star Tracker: Enable timestamp generation") oce.add("71", "Star Tracker: Enable timestamp generation")
oce.add(OpCodes.SET_TIME_FROM_SYS_TIME, Info.SET_TIME_FROM_SYS_TIME)
defs.add_service(CustomServiceList.STAR_TRACKER.value, "Star Tracker", oce) defs.add_service(CustomServiceList.STAR_TRACKER.value, "Star Tracker", oce)

View File

@ -83,7 +83,7 @@ def pack_pdec_handler_test(
0, 0,
ParameterId.POSITIVE_WINDOW, ParameterId.POSITIVE_WINDOW,
pw, pw,
).pack() )
) )
) )
if op_code == OpCode.NEGATIVE_WINDOW: if op_code == OpCode.NEGATIVE_WINDOW:
@ -96,7 +96,7 @@ def pack_pdec_handler_test(
0, 0,
ParameterId.NEGATIVE_WINDOW, ParameterId.NEGATIVE_WINDOW,
nw, nw,
).pack() )
) )
) )
if op_code == OpCode.RESET_NO_INIT: if op_code == OpCode.RESET_NO_INIT:

View File

@ -3,6 +3,7 @@ import enum
from eive_tmtc.config.definitions import CustomServiceList from eive_tmtc.config.definitions import CustomServiceList
from eive_tmtc.config.object_ids import COM_SUBSYSTEM_ID from eive_tmtc.config.object_ids import COM_SUBSYSTEM_ID
from eive_tmtc.tmtc.com.syrlinks_handler import Datarate from eive_tmtc.tmtc.com.syrlinks_handler import Datarate
from tmtccmd.pus.s20_fsfw_param_defs import create_scalar_u8_parameter
from .defs import Mode as ComMode from .defs import Mode as ComMode
@ -21,7 +22,6 @@ from tmtccmd.tc.pus_200_fsfw_mode import (
) )
from tmtccmd.tc.pus_20_fsfw_param import ( from tmtccmd.tc.pus_20_fsfw_param import (
create_load_param_cmd, create_load_param_cmd,
pack_scalar_u8_parameter_app_data,
) )
from tmtccmd.pus.s20_fsfw_param import create_scalar_u32_parameter from tmtccmd.pus.s20_fsfw_param import create_scalar_u32_parameter
@ -87,7 +87,7 @@ def build_com_subsystem_cmd(p: ServiceProviderParams): # noqa C901
q.add_log_cmd(f"{prefix}: {Info.UPDATE_DEFAULT_DATARATE_LOW}") q.add_log_cmd(f"{prefix}: {Info.UPDATE_DEFAULT_DATARATE_LOW}")
q.add_pus_tc( q.add_pus_tc(
create_load_param_cmd( create_load_param_cmd(
pack_scalar_u8_parameter_app_data( create_scalar_u8_parameter(
COM_SUBSYSTEM_ID, COM_SUBSYSTEM_ID,
0, 0,
ParameterId.DATARATE, ParameterId.DATARATE,
@ -99,7 +99,7 @@ def build_com_subsystem_cmd(p: ServiceProviderParams): # noqa C901
q.add_log_cmd(f"{prefix}: {Info.UPDATE_DEFAULT_DATARATE_HIGH}") q.add_log_cmd(f"{prefix}: {Info.UPDATE_DEFAULT_DATARATE_HIGH}")
q.add_pus_tc( q.add_pus_tc(
create_load_param_cmd( create_load_param_cmd(
pack_scalar_u8_parameter_app_data( create_scalar_u8_parameter(
COM_SUBSYSTEM_ID, COM_SUBSYSTEM_ID,
0, 0,
ParameterId.DATARATE, ParameterId.DATARATE,
@ -122,7 +122,7 @@ def build_com_subsystem_cmd(p: ServiceProviderParams): # noqa C901
0, 0,
ParameterId.TRANSMITTER_TIMEOUT, ParameterId.TRANSMITTER_TIMEOUT,
timeout, timeout,
).pack() )
) )
) )
elif o == OpCode.READ_MODE: elif o == OpCode.READ_MODE:

View File

@ -21,9 +21,9 @@ from tmtccmd.tc import DefaultPusQueueHelper
from tmtccmd.tc.pus_3_fsfw_hk import ( from tmtccmd.tc.pus_3_fsfw_hk import (
make_sid, make_sid,
create_request_one_diag_command, create_request_one_diag_command,
create_enable_periodic_hk_command_with_interval,
create_disable_periodic_hk_command,
create_request_one_hk_command, create_request_one_hk_command,
create_enable_periodic_hk_command_with_interval_with_diag,
create_disable_periodic_hk_command_with_diag,
) )
from spacepackets.ecss.tc import PusTelecommand from spacepackets.ecss.tc import PusTelecommand
from tmtccmd.tc.pus_200_fsfw_mode import Mode, create_mode_command from tmtccmd.tc.pus_200_fsfw_mode import Mode, create_mode_command
@ -182,24 +182,28 @@ def pack_syrlinks_command( # noqa C901: Complexity okay here.
q.add_log_cmd(f"{prefix}: {Info.ENABLE_HK_RX_REGS}") q.add_log_cmd(f"{prefix}: {Info.ENABLE_HK_RX_REGS}")
sid = make_sid(obyt, SetId.RX_REGISTERS_DATASET) sid = make_sid(obyt, SetId.RX_REGISTERS_DATASET)
interval = float(input("HK interval in floating point seconds")) interval = float(input("HK interval in floating point seconds"))
cmds = create_enable_periodic_hk_command_with_interval(True, sid, interval) cmds = create_enable_periodic_hk_command_with_interval_with_diag(
True, sid, interval
)
for cmd in cmds: for cmd in cmds:
q.add_pus_tc(cmd) q.add_pus_tc(cmd)
if op_code in OpCode.DISABLE_HK_RX_REGS: if op_code in OpCode.DISABLE_HK_RX_REGS:
q.add_log_cmd(f"{prefix}: {Info.DISABLE_HK_RX_REGS}") q.add_log_cmd(f"{prefix}: {Info.DISABLE_HK_RX_REGS}")
sid = make_sid(obyt, SetId.RX_REGISTERS_DATASET) sid = make_sid(obyt, SetId.RX_REGISTERS_DATASET)
q.add_pus_tc(create_disable_periodic_hk_command(True, sid)) q.add_pus_tc(create_disable_periodic_hk_command_with_diag(True, sid))
if op_code in OpCode.ENABLE_HK_TX_REGS: if op_code in OpCode.ENABLE_HK_TX_REGS:
q.add_log_cmd(f"{prefix}: {Info.ENABLE_HK_TX_REGS}") q.add_log_cmd(f"{prefix}: {Info.ENABLE_HK_TX_REGS}")
sid = make_sid(obyt, SetId.TX_REGISTERS_DATASET) sid = make_sid(obyt, SetId.TX_REGISTERS_DATASET)
interval = float(input("HK interval in floating point seconds")) interval = float(input("HK interval in floating point seconds"))
cmds = create_enable_periodic_hk_command_with_interval(True, sid, interval) cmds = create_enable_periodic_hk_command_with_interval_with_diag(
True, sid, interval
)
for cmd in cmds: for cmd in cmds:
q.add_pus_tc(cmd) q.add_pus_tc(cmd)
if op_code in OpCode.DISABLE_HK_TX_REGS: if op_code in OpCode.DISABLE_HK_TX_REGS:
q.add_log_cmd(f"{prefix}: {Info.DISABLE_HK_TX_REGS}") q.add_log_cmd(f"{prefix}: {Info.DISABLE_HK_TX_REGS}")
sid = make_sid(obyt, SetId.TX_REGISTERS_DATASET) sid = make_sid(obyt, SetId.TX_REGISTERS_DATASET)
q.add_pus_tc(create_disable_periodic_hk_command(True, sid)) q.add_pus_tc(create_disable_periodic_hk_command_with_diag(True, sid))
if op_code in OpCode.HK_TX_REGS: if op_code in OpCode.HK_TX_REGS:
q.add_log_cmd(f"{prefix}: {Info.HK_TX_REGS}") q.add_log_cmd(f"{prefix}: {Info.HK_TX_REGS}")
sid = make_sid(obyt, SetId.TX_REGISTERS_DATASET) sid = make_sid(obyt, SetId.TX_REGISTERS_DATASET)

View File

@ -24,6 +24,19 @@ from tmtccmd.fsfw.tmtc_printer import FsfwTmTcPrinter
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
class SdState(enum.IntEnum):
OFF = 0
ON = 1
MOUNTED = 2
class SdCardSelect(enum.IntEnum):
SD_0 = 0
SD_1 = 1
BOTH = 2
NONE = 3
class ActionId(enum.IntEnum): class ActionId(enum.IntEnum):
ANNOUNCE_VERSION = 1 ANNOUNCE_VERSION = 1
ANNOUNCE_CURRENT_IMAGE = 2 ANNOUNCE_CURRENT_IMAGE = 2
@ -32,6 +45,7 @@ class ActionId(enum.IntEnum):
RESET_REBOOT_COUNTER = 6 RESET_REBOOT_COUNTER = 6
SWITCH_IMG_LOCK = 7 SWITCH_IMG_LOCK = 7
SET_MAX_REBOOT_CNT = 8 SET_MAX_REBOOT_CNT = 8
READ_REBOOT_MECHANISM_INFO = 9
UPDATE_OBSW_FROM_SD_0 = 10 UPDATE_OBSW_FROM_SD_0 = 10
UPDATE_OBSW_FROM_SD_1 = 11 UPDATE_OBSW_FROM_SD_1 = 11
UPDATE_OBSW_FROM_TMP = 12 UPDATE_OBSW_FROM_TMP = 12
@ -87,14 +101,15 @@ class OpCode:
SWITCH_TO_SD_0 = ["switch_to_sd_0"] SWITCH_TO_SD_0 = ["switch_to_sd_0"]
SWITCH_TO_SD_1 = ["switch_to_sd_1"] SWITCH_TO_SD_1 = ["switch_to_sd_1"]
SWITCH_TO_BOTH_SD_CARDS = ["switch_to_both_sd_cards"] SWITCH_TO_BOTH_SD_CARDS = ["switch_to_both_sd_cards"]
ENABLE_REBOOT_FILE_HANDLING = ["rbh_off"] READ_REBOOT_MECHANISM_INFO = "rbh_info"
DISABLE_REBOOT_FILE_HANDLING = ["rbh_on"] ENABLE_REBOOT_FILE_HANDLING = "rwd_on"
RESET_ALL_REBOOT_COUNTERS = ["rbh_reset_a"] DISABLE_REBOOT_FILE_HANDLING = "rwd_off"
RESET_REBOOT_COUNTER_00 = ["rbh_reset_00"] RESET_ALL_REBOOT_COUNTERS = "rwd_reset_a"
RESET_REBOOT_COUNTER_01 = ["rbh_reset_01"] RWD_RESET_REBOOT_COUNTER_00 = "rwd_reset_00"
RESET_REBOOT_COUNTER_10 = ["rbh_reset_10"] RWD_RESET_REBOOT_COUNTER_01 = "rwd_reset_01"
RESET_REBOOT_COUNTER_11 = ["rbh_reset_11"] RWD_RESET_REBOOT_COUNTER_10 = "rwd_reset_10"
SET_MAX_REBOOT_CNT = ["rbh_max_cnt"] RWD_RESET_REBOOT_COUNTER_11 = "rwd_reset_11"
RWD_SET_MAX_REBOOT_CNT = "rwd_max_cnt"
class Info: class Info:
@ -110,6 +125,7 @@ class Info:
OBSW_UPDATE_FROM_SD_0 = "Update OBSW from SD Card 0" OBSW_UPDATE_FROM_SD_0 = "Update OBSW from SD Card 0"
OBSW_UPDATE_FROM_SD_1 = "Update OBSW from SD Card 1" OBSW_UPDATE_FROM_SD_1 = "Update OBSW from SD Card 1"
OBSW_UPDATE_FROM_TMP = "Update OBSW from tmp folder" OBSW_UPDATE_FROM_TMP = "Update OBSW from tmp folder"
READ_REBOOT_MECHANISM_INFO = "Read reboot mechansm information"
SWITCH_TO_SD_0 = "Switch to SD card 0" SWITCH_TO_SD_0 = "Switch to SD card 0"
SWITCH_TO_SD_1 = "Switch to SD card 1" SWITCH_TO_SD_1 = "Switch to SD card 1"
SWITCH_TO_BOTH_SD_CARDS = "Switch to both SD cards with specified active card" SWITCH_TO_BOTH_SD_CARDS = "Switch to both SD cards with specified active card"
@ -154,6 +170,9 @@ def add_core_controller_definitions(defs: TmtcDefinitionWrapper):
oce.add(keys=OpCode.XSC_REBOOT_1_0, info="Reboot 1 0") oce.add(keys=OpCode.XSC_REBOOT_1_0, info="Reboot 1 0")
oce.add(keys=OpCode.XSC_REBOOT_1_1, info="Reboot 1 1") oce.add(keys=OpCode.XSC_REBOOT_1_1, info="Reboot 1 1")
oce.add(keys=OpCode.SET_PREF_SD, info=Info.SET_PREF_SD) oce.add(keys=OpCode.SET_PREF_SD, info=Info.SET_PREF_SD)
oce.add(
keys=OpCode.READ_REBOOT_MECHANISM_INFO, info=Info.READ_REBOOT_MECHANISM_INFO
)
oce.add(keys=OpCode.OBSW_UPDATE_FROM_TMP, info=Info.OBSW_UPDATE_FROM_TMP) oce.add(keys=OpCode.OBSW_UPDATE_FROM_TMP, info=Info.OBSW_UPDATE_FROM_TMP)
oce.add(keys=OpCode.OBSW_UPDATE_FROM_SD_0, info=Info.OBSW_UPDATE_FROM_SD_0) oce.add(keys=OpCode.OBSW_UPDATE_FROM_SD_0, info=Info.OBSW_UPDATE_FROM_SD_0)
oce.add(keys=OpCode.OBSW_UPDATE_FROM_SD_1, info=Info.OBSW_UPDATE_FROM_SD_1) oce.add(keys=OpCode.OBSW_UPDATE_FROM_SD_1, info=Info.OBSW_UPDATE_FROM_SD_1)
@ -182,21 +201,25 @@ def add_core_controller_definitions(defs: TmtcDefinitionWrapper):
info="Reset all reboot counters", info="Reset all reboot counters",
) )
oce.add( oce.add(
keys=OpCode.RESET_REBOOT_COUNTER_00, keys=OpCode.RWD_RESET_REBOOT_COUNTER_00,
info="Reset reboot counter 0 0", info="Reset reboot counter 0 0",
) )
oce.add( oce.add(
keys=OpCode.RESET_REBOOT_COUNTER_01, keys=OpCode.RWD_RESET_REBOOT_COUNTER_01,
info="Reset reboot counter 0 1", info="Reset reboot counter 0 1",
) )
oce.add( oce.add(
keys=OpCode.RESET_REBOOT_COUNTER_10, keys=OpCode.RWD_RESET_REBOOT_COUNTER_10,
info="Reset reboot counter 1 0", info="Reset reboot counter 1 0",
) )
oce.add( oce.add(
keys=OpCode.RESET_REBOOT_COUNTER_11, keys=OpCode.RWD_RESET_REBOOT_COUNTER_11,
info="Reset reboot counter 1 1", info="Reset reboot counter 1 1",
) )
oce.add(
keys=OpCode.RWD_SET_MAX_REBOOT_CNT,
info="Reset max reboot count for reboot watchdog",
)
oce.add(keys=OpCode.OBSW_UPDATE_FROM_SD_0, info=Info.OBSW_UPDATE_FROM_SD_0) oce.add(keys=OpCode.OBSW_UPDATE_FROM_SD_0, info=Info.OBSW_UPDATE_FROM_SD_0)
oce.add(keys=OpCode.OBSW_UPDATE_FROM_SD_1, info=Info.OBSW_UPDATE_FROM_SD_1) oce.add(keys=OpCode.OBSW_UPDATE_FROM_SD_1, info=Info.OBSW_UPDATE_FROM_SD_1)
oce.add(keys=OpCode.OBSW_UPDATE_FROM_TMP, info=Info.OBSW_UPDATE_FROM_TMP) oce.add(keys=OpCode.OBSW_UPDATE_FROM_TMP, info=Info.OBSW_UPDATE_FROM_TMP)
@ -294,7 +317,15 @@ def pack_core_commands( # noqa C901
chip=Chip.CHIP_1, chip=Chip.CHIP_1,
copy=Copy.COPY_1_GOLD, copy=Copy.COPY_1_GOLD,
) )
elif op_code in OpCode.DISABLE_REBOOT_FILE_HANDLING: elif op_code == OpCode.READ_REBOOT_MECHANISM_INFO:
q.add_log_cmd(Info.READ_REBOOT_MECHANISM_INFO)
q.add_pus_tc(
create_action_cmd(
object_id=CORE_CONTROLLER_ID,
action_id=ActionId.READ_REBOOT_MECHANISM_INFO,
)
)
elif op_code == OpCode.DISABLE_REBOOT_FILE_HANDLING:
q.add_log_cmd("Disabling reboot file handling") q.add_log_cmd("Disabling reboot file handling")
user_data = bytearray([0]) user_data = bytearray([0])
q.add_pus_tc( q.add_pus_tc(
@ -304,7 +335,7 @@ def pack_core_commands( # noqa C901
user_data=user_data, user_data=user_data,
) )
) )
elif op_code in OpCode.ENABLE_REBOOT_FILE_HANDLING: elif op_code == OpCode.ENABLE_REBOOT_FILE_HANDLING:
q.add_log_cmd("Enabling reboot file handling") q.add_log_cmd("Enabling reboot file handling")
user_data = bytearray([1]) user_data = bytearray([1])
q.add_pus_tc( q.add_pus_tc(
@ -314,7 +345,7 @@ def pack_core_commands( # noqa C901
user_data=user_data, user_data=user_data,
) )
) )
elif op_code in OpCode.RESET_ALL_REBOOT_COUNTERS: elif op_code == OpCode.RESET_ALL_REBOOT_COUNTERS:
q.add_log_cmd("Resetting all reboot counters") q.add_log_cmd("Resetting all reboot counters")
q.add_pus_tc( q.add_pus_tc(
create_action_cmd( create_action_cmd(
@ -322,14 +353,25 @@ def pack_core_commands( # noqa C901
action_id=ActionId.RESET_REBOOT_COUNTER, action_id=ActionId.RESET_REBOOT_COUNTER,
) )
) )
elif op_code in OpCode.RESET_REBOOT_COUNTER_00: elif op_code == OpCode.RWD_RESET_REBOOT_COUNTER_00:
reset_specific_boot_counter(q, 0, 0) reset_specific_boot_counter(q, 0, 0)
elif op_code in OpCode.RESET_REBOOT_COUNTER_01: elif op_code == OpCode.RWD_RESET_REBOOT_COUNTER_01:
reset_specific_boot_counter(q, 0, 1) reset_specific_boot_counter(q, 0, 1)
elif op_code in OpCode.RESET_REBOOT_COUNTER_10: elif op_code == OpCode.RWD_RESET_REBOOT_COUNTER_10:
reset_specific_boot_counter(q, 1, 0) reset_specific_boot_counter(q, 1, 0)
elif op_code in OpCode.RESET_REBOOT_COUNTER_11: elif op_code == OpCode.RWD_RESET_REBOOT_COUNTER_11:
reset_specific_boot_counter(q, 1, 1) reset_specific_boot_counter(q, 1, 1)
elif op_code == OpCode.RWD_SET_MAX_REBOOT_CNT:
max_count = int(input("Set new maximum reboot threshold [1, 50]: "))
if max_count < 1 or max_count > 50:
raise ValueError("Invalid value, must be in range 1 to 50")
q.add_pus_tc(
create_action_cmd(
CORE_CONTROLLER_ID,
ActionId.SET_MAX_REBOOT_CNT,
user_data=bytes([max_count]),
)
)
elif op_code in OpCode.OBSW_UPDATE_FROM_SD_0: elif op_code in OpCode.OBSW_UPDATE_FROM_SD_0:
q.add_log_cmd(Info.OBSW_UPDATE_FROM_SD_0) q.add_log_cmd(Info.OBSW_UPDATE_FROM_SD_0)
q.add_pus_tc(pack_obsw_update_cmd(ActionId.UPDATE_OBSW_FROM_SD_0)) q.add_pus_tc(pack_obsw_update_cmd(ActionId.UPDATE_OBSW_FROM_SD_0))
@ -385,14 +427,17 @@ def pack_core_commands( # noqa C901
domain_id=0, domain_id=0,
unique_id=ParamId.PREF_SD, unique_id=ParamId.PREF_SD,
parameter=pref_sd, parameter=pref_sd,
).pack() )
) )
) )
elif op_code == OpCode.CP_HELPER: elif op_code == OpCode.CP_HELPER:
cp_recursive = int(input("Copy recursively (0/1) ?: ")) cp_recursive = int(input("Copy recursively (0/1) ?: "))
if cp_recursive not in [0, 1]: if cp_recursive not in [0, 1]:
raise ValueError("Invalid value, only 0 or 1 allowed") raise ValueError("Invalid value, only 0 or 1 allowed")
user_data = bytearray([cp_recursive]) cp_force = int(input("Copy with force option(0/1) ?: "))
if cp_force not in [0, 1]:
raise ValueError("Invalid value, only 0 or 1 allowed")
user_data = bytearray([cp_recursive, cp_force])
user_data.extend(packet_source_dest_path("Copy")) user_data.extend(packet_source_dest_path("Copy"))
q.add_log_cmd(Info.CP_HELPER) q.add_log_cmd(Info.CP_HELPER)
q.add_pus_tc( q.add_pus_tc(
@ -603,43 +648,85 @@ def handle_core_hk_data(pw: PrintWrapper, set_id: int, hk_data: bytes):
def handle_core_ctrl_action_replies( def handle_core_ctrl_action_replies(
action_id: int, pw: PrintWrapper, custom_data: bytes action_id: int, pw: PrintWrapper, custom_data: bytes
): ):
if action_id == ActionId.LIST_DIR_DUMP_DIRECTLY: if action_id == ActionId.READ_REBOOT_MECHANISM_INFO:
if len(custom_data) < 4: handle_reboot_mechanism_info_reply(pw, custom_data)
_LOGGER.warning("Data unexpectedly small") elif action_id == ActionId.LIST_DIR_DUMP_DIRECTLY:
return handle_list_dir_dump_reply(pw, custom_data)
seq_idx = struct.unpack("!I", custom_data[0:4])[0]
total_chunks = struct.unpack("!I", custom_data[4:8])[0]
compressed = custom_data[8] def handle_reboot_mechanism_info_reply(pw: PrintWrapper, custom_data: bytes):
ls_cmd = custom_data[9:].split(b"\x00")[0].decode() pw.dlog("Received reboot mechansm information")
# Include length of NULL termination fmt_str = "!BIIIIIBBBBBBBB"
file_data_offset = 9 + len(ls_cmd) + 1 inc_len = struct.calcsize(fmt_str)
if len(custom_data) < inc_len:
raise ValueError(f"Received custom data shorter than expected {inc_len}")
(
enabled,
max_count,
img00_count,
img01_count,
img10_count,
img11_count,
img00_lock,
img01_lock,
img10_lock,
img11_lock,
last_chip,
last_copy,
next_chip,
next_copy,
) = struct.unpack(fmt_str, custom_data[:inc_len])
pw.dlog(f"Enabled: {enabled}")
pw.dlog(f"Max Count: {max_count}")
pw.dlog(f"Count 00: {img00_count}")
pw.dlog(f"Count 01: {img01_count}")
pw.dlog(f"Count 10: {img10_count}")
pw.dlog(f"Count 11: {img11_count}")
pw.dlog(f"Lock 00: {img00_lock}")
pw.dlog(f"Lock 01: {img01_lock}")
pw.dlog(f"Lock 10: {img10_lock}")
pw.dlog(f"Lock 11: {img11_lock}")
pw.dlog(f"Last Chip: {last_chip}")
pw.dlog(f"Last Copy: {last_copy}")
pw.dlog(f"Next Chip: {next_chip}")
pw.dlog(f"Next Copy: {next_copy}")
def handle_list_dir_dump_reply(pw: PrintWrapper, custom_data: bytes):
if len(custom_data) < 4:
_LOGGER.warning("Data unexpectedly small")
return
seq_idx = struct.unpack("!I", custom_data[0:4])[0]
total_chunks = struct.unpack("!I", custom_data[4:8])[0]
compressed = custom_data[8]
ls_cmd = custom_data[9:].split(b"\x00")[0].decode()
# Include length of NULL termination
file_data_offset = 9 + len(ls_cmd) + 1
pw.dlog(
f"Received directory listing dump for ls command {ls_cmd}. "
f"Chunk {seq_idx + 1}/{total_chunks}"
)
def remove_if_exists_and_new(seq_idx_: int, path_: Path):
if seq_idx_ == 0 and path_.exists():
os.remove(path_)
if compressed:
path = Path("dir_listing.txt.gz")
remove_if_exists_and_new(seq_idx, path)
pw.dlog( pw.dlog(
f"Received directory listing dump for ls command {ls_cmd}. " f"Compression option: {compressed}. Dumping file into dir_listing.txt.gz"
f"Chunk {seq_idx + 1}/{total_chunks}"
) )
with open(path, "ab") as listing_file:
def remove_if_exists_and_new(seq_idx_: int, path_: Path): listing_file.write(custom_data[file_data_offset:])
if seq_idx_ == 0 and path_.exists(): else:
os.remove(path_) path = Path("dir_listing.txt")
remove_if_exists_and_new(seq_idx, path)
if compressed: pw.dlog(f"Compression option: {compressed}. Dumping file into dir_listing.txt")
path = Path("dir_listing.txt.gz") with open(path, "a") as listing_file:
remove_if_exists_and_new(seq_idx, path) listing_file_str = custom_data[file_data_offset:].decode()
pw.dlog( listing_file.write(listing_file_str)
f"Compression option: {compressed}. Dumping file into dir_listing.txt.gz" if seq_idx + 1 == total_chunks:
) pw.dlog("Full directory listing: ")
with open(path, "ab") as listing_file: with open("dir_listing.txt", "r") as listing_file:
listing_file.write(custom_data[file_data_offset:]) print(listing_file.read())
else:
path = Path("dir_listing.txt")
remove_if_exists_and_new(seq_idx, path)
pw.dlog(
f"Compression option: {compressed}. Dumping file into dir_listing.txt"
)
with open(path, "a") as listing_file:
listing_file_str = custom_data[file_data_offset:].decode()
listing_file.write(listing_file_str)
if seq_idx + 1 == total_chunks:
pw.dlog("Full directory listing: ")
with open("dir_listing.txt", "r") as listing_file:
print(listing_file.read())

View File

@ -0,0 +1,24 @@
import enum
import struct
from tmtccmd.fsfw.tmtc_printer import FsfwTmTcPrinter
from eive_tmtc.pus_tm.defs import PrintWrapper
class SetId(enum.IntEnum):
ERROR_ID = 0
def handle_ier_hk_data(pw: PrintWrapper, hk_data: bytes, set_id: int):
pw.dlog(f"Received internal error reporter HK data with set ID {set_id}")
if set_id == SetId.ERROR_ID:
fmt_str = "!III"
inc_len = struct.calcsize(fmt_str)
(tm_errors, queue_errors, store_hits) = struct.unpack(
fmt_str, hk_data[:inc_len]
)
pw.dlog(f"TM Errors: {tm_errors}")
pw.dlog(f"Queue Errors: {queue_errors}")
pw.dlog(f"Store Errors: {store_hits}")
pw.dlog(FsfwTmTcPrinter.get_validity_buffer(hk_data[inc_len:], 3))

View File

@ -14,6 +14,13 @@ from eive_tmtc.config.object_ids import (
RW1_ID, RW1_ID,
RW2_ID, RW2_ID,
RTD_0_PLOC_HSPD, RTD_0_PLOC_HSPD,
TMP1075_HANDLER_TCS_BRD_1_ID,
TMP1075_HANDLER_TCS_BRD_0_ID,
TMP1075_HANDLER_PLPCDU_0_ID,
TMP1075_HANDLER_PLPCDU_1_ID,
TMP1075_HANDLER_IF_BRD_ID,
STR_ASSEMBLY,
STAR_TRACKER_ID,
) )
SUBSYSTEM_DICT = { SUBSYSTEM_DICT = {
@ -27,20 +34,27 @@ ACS_OBJ_DICT = {
1: ("SUS Assembly", SUS_BOARD_ASS_ID), 1: ("SUS Assembly", SUS_BOARD_ASS_ID),
2: ("ACS Board Assembly", ACS_BOARD_ASS_ID), 2: ("ACS Board Assembly", ACS_BOARD_ASS_ID),
3: ("RW Assembly", RW_ASSEMBLY), 3: ("RW Assembly", RW_ASSEMBLY),
4: ("iMTQ MGT", IMTQ_HANDLER_ID), 4: ("STR Assembly", STR_ASSEMBLY),
5: ("GYR 0 ADIS", GYRO_0_ADIS_HANDLER_ID), 5: ("iMTQ MGT", IMTQ_HANDLER_ID),
6: ("GYR 1 L3G", GYRO_1_L3G_HANDLER_ID), 6: ("GYR 0 ADIS", GYRO_0_ADIS_HANDLER_ID),
7: ("MGM 0 LIS3", MGM_0_LIS3_HANDLER_ID), 7: ("GYR 1 L3G", GYRO_1_L3G_HANDLER_ID),
8: ("MGM 1 RM3100", MGM_1_RM3100_HANDLER_ID), 8: ("MGM 0 LIS3", MGM_0_LIS3_HANDLER_ID),
9: ("GPS 0 Health Device", GPS_0_HEALTH_DEV), 9: ("MGM 1 RM3100", MGM_1_RM3100_HANDLER_ID),
10: ("SUS 0", SUS_0_N_LOC_XFYFZM_PT_XF), 10: ("GPS 0 Health Device", GPS_0_HEALTH_DEV),
11: ("SUS 6", SUS_6_R_LOC_XFYBZM_PT_XF), 11: ("SUS 0", SUS_0_N_LOC_XFYFZM_PT_XF),
12: ("RW 1", RW1_ID), 12: ("SUS 6", SUS_6_R_LOC_XFYBZM_PT_XF),
13: ("RW 2", RW2_ID), 13: ("RW 1", RW1_ID),
14: ("RW 2", RW2_ID),
15: ("STR", STAR_TRACKER_ID),
} }
TCS_OBJ_DICT = { TCS_OBJ_DICT = {
0: ("RTD 0", RTD_0_PLOC_HSPD), 0: ("RTD 0", RTD_0_PLOC_HSPD),
1: ("TMP1075 PL PCDU 0", TMP1075_HANDLER_PLPCDU_0_ID),
2: ("TMP1075 PL PCDU 1", TMP1075_HANDLER_PLPCDU_1_ID),
3: ("TMP1075 TCS 0", TMP1075_HANDLER_TCS_BRD_0_ID),
4: ("TMP1075 TCS 1", TMP1075_HANDLER_TCS_BRD_1_ID),
5: ("TMP1075 IF BOARD", TMP1075_HANDLER_IF_BRD_ID),
} }

View File

@ -570,12 +570,12 @@ def handle_ploc_mpsoc_hk_data(pw: PrintWrapper, hk_data: bytes, set_id: int):
pw.dlog(f"CAM SoC Temperature: {cam_soc_temp}") pw.dlog(f"CAM SoC Temperature: {cam_soc_temp}")
pw.dlog(f"System Monitor Temperature: {sysmon_temp}") pw.dlog(f"System Monitor Temperature: {sysmon_temp}")
pw.dlog( pw.dlog(
f"SYSMON VCC INT {sysmon_vcc_int:.3f} | SYSMON VCC AUX {sysmon_vcc_aux:.3f} | " f"SYSMON VCC INT {sysmon_vcc_int:.3f} | SYSMON VCC AUX"
f"SYSMON VCC BRAM {sysmon_vcc_bram:.3f}" f" {sysmon_vcc_aux:.3f} | SYSMON VCC BRAM {sysmon_vcc_bram:.3f}"
) )
pw.dlog( pw.dlog(
f"SYSMON VCC PAUX {sysmon_vcc_paux:.3f} | SYSMON VCC PINT {sysmon_vcc_pint:.3f} | " f"SYSMON VCC PAUX {sysmon_vcc_paux:.3f} | SYSMON VCC PINT"
f"SYSMON VCC PDRO {sysmon_vcc_pdro:.3f}" f" {sysmon_vcc_pint:.3f} | SYSMON VCC PDRO {sysmon_vcc_pdro:.3f}"
) )
fmt_str = "!fffffffffffff" fmt_str = "!fffffffffffff"
@ -602,8 +602,9 @@ def handle_ploc_mpsoc_hk_data(pw: PrintWrapper, hk_data: bytes, set_id: int):
f"SYSMON MBA 1V8 {sysmon_mb_1v8:.3f}" f"SYSMON MBA 1V8 {sysmon_mb_1v8:.3f}"
) )
pw.dlog( pw.dlog(
f"SYSMON VCC 12V {sysmon_vcc_12v:.3f} | SYSMON VCC 5V {sysmon_vcc_5v:.3f} | " f"SYSMON VCC 12V {sysmon_vcc_12v:.3f} | SYSMON VCC 5V {sysmon_vcc_5v:.3f} |"
f"SYSMON VCC 3V3 {sysmon_vcc_3v3:.3f} | SYSMON VCC 3V3VA {sysmon_vcc_3v3va}" f" SYSMON VCC 3V3 {sysmon_vcc_3v3:.3f} | SYSMON VCC 3V3VA"
f" {sysmon_vcc_3v3va}"
) )
pw.dlog( pw.dlog(
f"SYSMON VCC 2V5DDR {sysmon_vcc_2v5ddr:.3f} | " f"SYSMON VCC 2V5DDR {sysmon_vcc_2v5ddr:.3f} | "

View File

@ -172,7 +172,6 @@ class Info(str, enum.Enum):
@tmtc_definitions_provider @tmtc_definitions_provider
def add_ploc_supv_cmds(defs: TmtcDefinitionWrapper): def add_ploc_supv_cmds(defs: TmtcDefinitionWrapper):
oce = OpCodeEntry() oce = OpCodeEntry()
oce.add(OpCodes.OFF, Info.OFF) oce.add(OpCodes.OFF, Info.OFF)
oce.add(OpCodes.ON, Info.ON) oce.add(OpCodes.ON, Info.ON)
@ -472,8 +471,8 @@ def pack_ploc_supv_commands(p: ServiceProviderParams): # noqa C901
custom_data.extend(struct.pack("!B", memory_id)) custom_data.extend(struct.pack("!B", memory_id))
custom_data.extend(struct.pack("!I", start_address)) custom_data.extend(struct.pack("!I", start_address))
q.add_log_cmd( q.add_log_cmd(
f"{prefix}: {Info.MEM_CHECK} for file {update_file} at memory ID {memory_id} at start " f"{prefix}: {Info.MEM_CHECK} for file {update_file} at memory ID"
f"address {start_address}" f" {memory_id} at start address {start_address}"
) )
command = create_action_cmd( command = create_action_cmd(
object_id.as_bytes, SupvActionId.MEM_CHECK, custom_data object_id.as_bytes, SupvActionId.MEM_CHECK, custom_data
@ -723,10 +722,42 @@ def get_event_buffer_path() -> str:
return file return file
class SocState(enum.IntEnum):
OFF = 0
BOOTING = 1
OPERATIONAL = 2
SHUTDOWN = 3
def handle_supv_hk_data(set_id: int, hk_data: bytes, pw: PrintWrapper): def handle_supv_hk_data(set_id: int, hk_data: bytes, pw: PrintWrapper):
current_idx = 0 current_idx = 0
if set_id == SetIds.HK_REPORT: if set_id == SetIds.HK_REPORT:
pass fmt_str = "!IIIQIIIIIBBBB"
inc_len = struct.calcsize(fmt_str)
(
temp_ps,
temp_pl,
temp_sup,
uptime,
cpu_load,
avail_heap,
num_tcs,
num_tms,
soc_state,
nvm_0_1_state,
nvm_3_state,
mission_io_state,
fmc_state,
) = struct.unpack(fmt_str, hk_data[:inc_len])
pw.dlog(f"Temp PS {temp_ps} C | Temp PL {temp_pl} C | Temp SUP {temp_sup} C")
pw.dlog(f"Uptime {uptime} | CPU Load {cpu_load} | Avail Heap {avail_heap}")
pw.dlog(f"Number TCs {num_tcs} | Number TMs {num_tms}")
pw.dlog(f"SOC state {SocState(soc_state)}")
pw.dlog(f"NVM 01 State {nvm_0_1_state}")
pw.dlog(f"NVM 3 State {nvm_3_state}")
pw.dlog(f"Mission IO state {mission_io_state}")
pw.dlog(f"FMC state {fmc_state}")
pw.dlog(FsfwTmTcPrinter.get_validity_buffer(hk_data[inc_len:], 13))
elif set_id == SetIds.BOOT_STATUS_REPORT: elif set_id == SetIds.BOOT_STATUS_REPORT:
fmt_str = "!BBIIBBBBBB" fmt_str = "!BBIIBBBBBB"
inc_len = struct.calcsize(fmt_str) inc_len = struct.calcsize(fmt_str)
@ -744,7 +775,8 @@ def handle_supv_hk_data(set_id: int, hk_data: bytes, pw: PrintWrapper):
) = struct.unpack(fmt_str, hk_data[0 : 0 + inc_len]) ) = struct.unpack(fmt_str, hk_data[0 : 0 + inc_len])
current_idx += inc_len current_idx += inc_len
pw.dlog( pw.dlog(
f"SoC state (0:off, 1:booting, 2:update, 3:operating, 4:shutdown, 5:reset): {soc_state}" "SoC state (0:off, 1:booting, 2:update, 3:operating, 4:shutdown, 5:reset):"
f" {soc_state}"
) )
pw.dlog(f"Power Cycles {power_cycles}") pw.dlog(f"Power Cycles {power_cycles}")
pw.dlog(f"Boot after {boot_after_ms} ms | Boot timeout {boot_timeout_ms} ms") pw.dlog(f"Boot after {boot_after_ms} ms | Boot timeout {boot_timeout_ms} ms")

View File

@ -17,17 +17,17 @@ USE_SCEX_CONF_FILE = True
class OpCode: class OpCode:
PING = ["0", "ping"] PING = "ping"
ION_CMD = ["1", "ion"] ION_CMD = "ion"
TEMP_CMD = ["2", "temp"] TEMP_CMD = "temp"
EXP_STATUS_CMD = ["3", "expstatus"] EXP_STATUS_CMD = "expstatus"
ONE_CELLS_CMD = ["4", "onecell"] ONE_CELLS_CMD = "onecell"
ALL_CELLS_CMD = ["5", "allcells"] ALL_CELLS_CMD = "allcells"
FRAM = ["6", "fram"] FRAM = "fram"
SWITCH_ON = ["7", "on"] SWITCH_ON = "on"
SWITCH_OFF = ["8", "off"] SWITCH_OFF = "off"
class ActionId(enum.IntEnum): class ActionId(enum.IntEnum):
@ -78,7 +78,7 @@ def add_scex_cmds(defs: TmtcDefinitionWrapper):
def pack_scex_cmds(p: ServiceProviderParams): # noqa C901 def pack_scex_cmds(p: ServiceProviderParams): # noqa C901
op_code = p.op_code op_code = p.op_code
q = p.queue_helper q = p.queue_helper
if op_code in OpCode.SWITCH_ON: if op_code == OpCode.SWITCH_ON:
q.add_log_cmd(Info.SWITCH_ON) q.add_log_cmd(Info.SWITCH_ON)
q.add_pus_tc( q.add_pus_tc(
PusTelecommand( PusTelecommand(
@ -87,7 +87,7 @@ def pack_scex_cmds(p: ServiceProviderParams): # noqa C901
app_data=pack_mode_data(SCEX_HANDLER_ID, Mode.ON, 0), app_data=pack_mode_data(SCEX_HANDLER_ID, Mode.ON, 0),
) )
) )
if op_code in OpCode.SWITCH_OFF: if op_code == OpCode.SWITCH_OFF:
q.add_log_cmd(Info.SWITCH_OFF) q.add_log_cmd(Info.SWITCH_OFF)
q.add_pus_tc( q.add_pus_tc(
PusTelecommand( PusTelecommand(
@ -96,20 +96,20 @@ def pack_scex_cmds(p: ServiceProviderParams): # noqa C901
app_data=pack_mode_data(SCEX_HANDLER_ID, Mode.OFF, 0), app_data=pack_mode_data(SCEX_HANDLER_ID, Mode.OFF, 0),
) )
) )
if op_code in OpCode.PING: if op_code == OpCode.PING:
q.add_log_cmd(Info.PING) q.add_log_cmd(Info.PING)
app_data = bytes([0]) app_data = bytes([0])
q.add_pus_tc(create_action_cmd(SCEX_HANDLER_ID, ActionId.PING, app_data)) q.add_pus_tc(create_action_cmd(SCEX_HANDLER_ID, ActionId.PING, app_data))
if op_code in OpCode.ION_CMD: if op_code == OpCode.ION_CMD:
q.add_log_cmd(Info.ION_CMD) q.add_log_cmd(Info.ION_CMD)
app_data = bytes([0]) app_data = bytes([0])
q.add_pus_tc(create_action_cmd(SCEX_HANDLER_ID, ActionId.ION_CMD, app_data)) q.add_pus_tc(create_action_cmd(SCEX_HANDLER_ID, ActionId.ION_CMD, app_data))
if op_code in OpCode.TEMP_CMD: if op_code == OpCode.TEMP_CMD:
q.add_log_cmd(Info.TEMP_CMD) q.add_log_cmd(Info.TEMP_CMD)
app_data = bytes([0]) app_data = bytes([0])
q.add_pus_tc(create_action_cmd(SCEX_HANDLER_ID, ActionId.TEMP_CMD, app_data)) q.add_pus_tc(create_action_cmd(SCEX_HANDLER_ID, ActionId.TEMP_CMD, app_data))
if op_code in OpCode.EXP_STATUS_CMD: if op_code == OpCode.EXP_STATUS_CMD:
q.add_log_cmd(Info.EXP_STATUS_CMD) q.add_log_cmd(Info.EXP_STATUS_CMD)
app_data = bytes([0]) app_data = bytes([0])
q.add_pus_tc( q.add_pus_tc(
@ -117,7 +117,7 @@ def pack_scex_cmds(p: ServiceProviderParams): # noqa C901
) )
# one cell # one cell
if op_code in OpCode.ONE_CELLS_CMD: if op_code == OpCode.ONE_CELLS_CMD:
q.add_log_cmd(Info.ONE_CELLS_CMD) q.add_log_cmd(Info.ONE_CELLS_CMD)
app_data = bytearray([0]) app_data = bytearray([0])
@ -131,8 +131,7 @@ def pack_scex_cmds(p: ServiceProviderParams): # noqa C901
cell_select = int(cell_select) cell_select = int(cell_select)
if cell_select < 1 or cell_select > 10: if cell_select < 1 or cell_select > 10:
print( print(
f"Invalid cell number {cell_select}, " f"Invalid cell number {cell_select}, Please enter a valid number: "
f"Please enter a valid number: "
) )
continue continue
cn = cell_select - 1 cn = cell_select - 1
@ -165,7 +164,7 @@ def pack_scex_cmds(p: ServiceProviderParams): # noqa C901
create_action_cmd(SCEX_HANDLER_ID, ActionId.ONE_CELLS_CMD, app_data) create_action_cmd(SCEX_HANDLER_ID, ActionId.ONE_CELLS_CMD, app_data)
) )
if op_code in OpCode.ALL_CELLS_CMD: if op_code == OpCode.ALL_CELLS_CMD:
q.add_log_cmd(Info.ALL_CELLS_CMD) q.add_log_cmd(Info.ALL_CELLS_CMD)
app_data = bytearray([0]) app_data = bytearray([0])
@ -197,7 +196,7 @@ def pack_scex_cmds(p: ServiceProviderParams): # noqa C901
create_action_cmd(SCEX_HANDLER_ID, ActionId.ALL_CELLS_CMD, app_data) create_action_cmd(SCEX_HANDLER_ID, ActionId.ALL_CELLS_CMD, app_data)
) )
if op_code in OpCode.FRAM: if op_code == OpCode.FRAM:
q.add_log_cmd(Info.FRAM) q.add_log_cmd(Info.FRAM)
app_data = bytes([0]) app_data = bytes([0])
q.add_pus_tc(create_action_cmd(SCEX_HANDLER_ID, ActionId.FRAM, app_data)) q.add_pus_tc(create_action_cmd(SCEX_HANDLER_ID, ActionId.FRAM, app_data))

View File

@ -12,7 +12,7 @@ from tmtccmd.tc.decorator import ServiceProviderParams
from tmtccmd.tc.pus_200_fsfw_mode import Subservice as ModeSubservice from tmtccmd.tc.pus_200_fsfw_mode import Subservice as ModeSubservice
class ModeId: class ModeId(enum.IntEnum):
OFF = 0 OFF = 0
SUPV_ONLY = 10 SUPV_ONLY = 10
MPSOC_STREAM = 11 MPSOC_STREAM = 11

View File

@ -41,15 +41,17 @@ class BpxHeaterModeSelect(enum.IntEnum):
class BpxOpCode: class BpxOpCode:
HK = ["0", "hk"] HK = "hk"
OFF = ["off"] OFF = "off"
ON = ["on"] ON = "on"
RST_CFG = "reset_cfg" RST_CFG = "reset_cfg"
SET_CFG = "set_cfg" SET_CFG = "set_cfg"
RST_BOOT_CNT = ["1", "rst_boot_cnt"] MAN_HEATER_ON = "man_heater_on"
REQUEST_CFG = ["2", "cfg"] MAN_HEATER_OFF = "man_heater_off"
REQUEST_CFG_HK = ["3", "cfg_hk"] RST_BOOT_CNT = "rst_boot_cnt"
REBOOT = ["4", "reboot"] REQUEST_CFG = "cfg"
REQUEST_CFG_HK = "cfg_hk"
REBOOT = "reboot"
@tmtc_definitions_provider @tmtc_definitions_provider
@ -59,8 +61,10 @@ def add_bpx_cmd_definitions(defs: TmtcDefinitionWrapper):
oce.add(keys=BpxOpCode.OFF, info="Off command") oce.add(keys=BpxOpCode.OFF, info="Off command")
oce.add(keys=BpxOpCode.HK, info="Request BPX HK") oce.add(keys=BpxOpCode.HK, info="Request BPX HK")
oce.add(keys=BpxOpCode.RST_BOOT_CNT, info="Reset Boot Count") oce.add(keys=BpxOpCode.RST_BOOT_CNT, info="Reset Boot Count")
oce.add(keys=BpxOpCode.RST_CFG, info="Reset Config") oce.add(keys=BpxOpCode.RST_CFG, info="Reset Config to stored default settings")
oce.add(keys=BpxOpCode.SET_CFG, info="Set BPX configuration") oce.add(keys=BpxOpCode.SET_CFG, info="Set BPX configuration")
oce.add(keys=BpxOpCode.MAN_HEATER_ON, info="Manual heater on")
oce.add(keys=BpxOpCode.MAN_HEATER_OFF, info="Manual heater off")
oce.add(keys=BpxOpCode.REQUEST_CFG, info="Request Configuration Struct (Step 1)") oce.add(keys=BpxOpCode.REQUEST_CFG, info="Request Configuration Struct (Step 1)")
oce.add( oce.add(
keys=BpxOpCode.REQUEST_CFG_HK, info="Request Configuration Struct HK (Step 2)" keys=BpxOpCode.REQUEST_CFG_HK, info="Request Configuration Struct HK (Step 2)"
@ -74,14 +78,14 @@ def add_bpx_cmd_definitions(defs: TmtcDefinitionWrapper):
@service_provider(CustomServiceList.BPX_BATTERY.value) @service_provider(CustomServiceList.BPX_BATTERY.value)
def pack_bpx_commands(p: ServiceProviderParams): def pack_bpx_commands(p: ServiceProviderParams): # noqa C901: Complexity is okay here.
op_code = p.op_code op_code = p.op_code
q = p.queue_helper q = p.queue_helper
if op_code in BpxOpCode.HK: if op_code == BpxOpCode.HK:
q.add_log_cmd("Requesting BPX battery HK set") q.add_log_cmd("Requesting BPX battery HK set")
sid = make_sid(object_id=BPX_HANDLER_ID, set_id=BpxSetId.GET_HK_SET) sid = make_sid(object_id=BPX_HANDLER_ID, set_id=BpxSetId.GET_HK_SET)
q.add_pus_tc(generate_one_hk_command(sid=sid)) q.add_pus_tc(generate_one_hk_command(sid=sid))
if op_code in BpxOpCode.OFF: if op_code == BpxOpCode.OFF:
q.add_log_cmd("Off mode") q.add_log_cmd("Off mode")
mode_cmd = pack_mode_data(BPX_HANDLER_ID, Mode.OFF, 0) mode_cmd = pack_mode_data(BPX_HANDLER_ID, Mode.OFF, 0)
q.add_pus_tc( q.add_pus_tc(
@ -91,7 +95,7 @@ def pack_bpx_commands(p: ServiceProviderParams):
app_data=mode_cmd, app_data=mode_cmd,
) )
) )
if op_code in BpxOpCode.ON: if op_code == BpxOpCode.ON:
q.add_log_cmd("On mode") q.add_log_cmd("On mode")
mode_cmd = pack_mode_data(BPX_HANDLER_ID, Mode.ON, 0) mode_cmd = pack_mode_data(BPX_HANDLER_ID, Mode.ON, 0)
q.add_pus_tc( q.add_pus_tc(
@ -101,7 +105,7 @@ def pack_bpx_commands(p: ServiceProviderParams):
app_data=mode_cmd, app_data=mode_cmd,
) )
) )
if op_code in BpxOpCode.RST_BOOT_CNT: if op_code == BpxOpCode.RST_BOOT_CNT:
q.add_log_cmd("Resetting reboot counters") q.add_log_cmd("Resetting reboot counters")
q.add_pus_tc( q.add_pus_tc(
create_action_cmd( create_action_cmd(
@ -133,20 +137,39 @@ def pack_bpx_commands(p: ServiceProviderParams):
user_data=user_data, user_data=user_data,
) )
) )
if op_code in BpxOpCode.REQUEST_CFG: if op_code == BpxOpCode.REQUEST_CFG:
q.add_log_cmd("Requesting configuration struct") q.add_log_cmd("Requesting configuration struct")
q.add_pus_tc( q.add_pus_tc(
create_action_cmd(object_id=BPX_HANDLER_ID, action_id=BpxActionId.GET_CFG) create_action_cmd(object_id=BPX_HANDLER_ID, action_id=BpxActionId.GET_CFG)
) )
if op_code in BpxOpCode.REQUEST_CFG_HK: if op_code == BpxOpCode.REQUEST_CFG_HK:
q.add_log_cmd("Requesting configuration struct HK") q.add_log_cmd("Requesting configuration struct HK")
sid = make_sid(object_id=BPX_HANDLER_ID, set_id=BpxSetId.GET_CFG_SET) sid = make_sid(object_id=BPX_HANDLER_ID, set_id=BpxSetId.GET_CFG_SET)
q.add_pus_tc(generate_one_hk_command(sid=sid)) q.add_pus_tc(generate_one_hk_command(sid=sid))
if op_code in BpxOpCode.REBOOT: if op_code == BpxOpCode.REBOOT:
q.add_log_cmd("Rebooting BPX battery") q.add_log_cmd("Rebooting BPX battery")
q.add_pus_tc( q.add_pus_tc(
create_action_cmd(object_id=BPX_HANDLER_ID, action_id=BpxActionId.REBOOT) create_action_cmd(object_id=BPX_HANDLER_ID, action_id=BpxActionId.REBOOT)
) )
if op_code == BpxOpCode.MAN_HEATER_ON:
q.add_log_cmd("BPX manual heater on with seconds burntime")
burn_time = int(input("BPX heater burn time in seconds [1-65535]: "))
if burn_time < 1 or burn_time > 65535:
raise ValueError("Invalid burntime, smaller than 0 or larger than 65535")
q.add_pus_tc(
create_action_cmd(
object_id=BPX_HANDLER_ID,
action_id=BpxActionId.MAN_HEATER_ON,
user_data=struct.pack("!H", burn_time),
)
)
if op_code == BpxOpCode.MAN_HEATER_OFF:
q.add_log_cmd("BPX manual heater off")
q.add_pus_tc(
create_action_cmd(
object_id=BPX_HANDLER_ID, action_id=BpxActionId.MAN_HEATER_OFF
)
)
HEADER_LIST = [ HEADER_LIST = [

View File

@ -200,7 +200,8 @@ def pack_common_gomspace_cmds( # noqa C901: Complexity is okay here.
if op_code in GomspaceOpCode.SAVE_TABLE_DEFAULT: if op_code in GomspaceOpCode.SAVE_TABLE_DEFAULT:
source_table = int( source_table = int(
input( input(
"Source table [0: Board Config, 1: Module Config, 2: Calibration Parameter]: " "Source table [0: Board Config, 1: Module Config, 2: Calibration"
" Parameter]: "
) )
) )
if source_table not in [0, 1, 2]: if source_table not in [0, 1, 2]:
@ -215,8 +216,8 @@ def pack_common_gomspace_cmds( # noqa C901: Complexity is okay here.
if op_code in GomspaceOpCode.LOAD_TABLE: if op_code in GomspaceOpCode.LOAD_TABLE:
target_table = int( target_table = int(
input( input(
"Target table ID [0: Board Config, 1: Module Config, 2: Calibration Parameter, " "Target table ID [0: Board Config, 1: Module Config, 2: Calibration"
"4: HK TM]: " " Parameter, 4: HK TM]: "
) )
) )
if target_table not in [0, 1, 2, 4]: if target_table not in [0, 1, 2, 4]:
@ -224,8 +225,8 @@ def pack_common_gomspace_cmds( # noqa C901: Complexity is okay here.
if target_table != 4: if target_table != 4:
source_table = int( source_table = int(
input( input(
"Source table (file or default) [0: Board Config, 1: Module Config, " "Source table (file or default) [0: Board Config, 1: Module Config,"
"2: Calibration Parameter, value + 4 for default table]: " " 2: Calibration Parameter, value + 4 for default table]: "
) )
) )
if source_table not in [0, 1, 2, 4, 5, 6]: if source_table not in [0, 1, 2, 4, 5, 6]:

View File

@ -85,6 +85,40 @@ class NormalSubmodesMask(enum.IntEnum):
HPA_ON = 5 HPA_ON = 5
class SubmodeForNormalMode(enum.IntEnum):
NONE = 0
SSR_ON = 1 << NormalSubmodesMask.SOLID_STATE_RELAYS_ADC_ON
DRO_ON = 1 << NormalSubmodesMask.DRO_ON | (
1 << NormalSubmodesMask.SOLID_STATE_RELAYS_ADC_ON
)
X8_ON = (
1 << NormalSubmodesMask.DRO_ON
| (1 << NormalSubmodesMask.SOLID_STATE_RELAYS_ADC_ON)
| (1 << NormalSubmodesMask.X8_ON)
)
TX_ON = (
1 << NormalSubmodesMask.DRO_ON
| (1 << NormalSubmodesMask.SOLID_STATE_RELAYS_ADC_ON)
| (1 << NormalSubmodesMask.X8_ON)
| (1 << NormalSubmodesMask.TX_ON)
)
MPA_ON = (
1 << NormalSubmodesMask.DRO_ON
| (1 << NormalSubmodesMask.SOLID_STATE_RELAYS_ADC_ON)
| (1 << NormalSubmodesMask.X8_ON)
| (1 << NormalSubmodesMask.TX_ON)
| (1 << NormalSubmodesMask.MPA_ON)
)
HPA_ON = (
1 << NormalSubmodesMask.DRO_ON
| (1 << NormalSubmodesMask.SOLID_STATE_RELAYS_ADC_ON)
| (1 << NormalSubmodesMask.X8_ON)
| (1 << NormalSubmodesMask.TX_ON)
| (1 << NormalSubmodesMask.MPA_ON)
| (1 << NormalSubmodesMask.HPA_ON)
)
class ParamIds(enum.IntEnum): class ParamIds(enum.IntEnum):
NEG_V_LOWER_BOUND = 0 NEG_V_LOWER_BOUND = 0
NEG_V_UPPER_BOUND = 1 NEG_V_UPPER_BOUND = 1
@ -250,7 +284,7 @@ def hpa_on_procedure(q: DefaultPusQueueHelper):
if delay_dro_to_x8 is None: if delay_dro_to_x8 is None:
delay_dro_to_x8 = 900 delay_dro_to_x8 = 900
q.add_log_cmd( q.add_log_cmd(
f"Starting procedure to switch on PL PCDU HPA with DRO to X8 " "Starting procedure to switch on PL PCDU HPA with DRO to X8 "
f"delay of {delay_dro_to_x8} seconds" f"delay of {delay_dro_to_x8} seconds"
) )
pl_pcdu_on = PusTelecommand( pl_pcdu_on = PusTelecommand(
@ -383,41 +417,17 @@ def request_wait_time() -> Optional[float]:
def submode_mask_to_submode(on_tgt: NormalSubmodesMask) -> int: def submode_mask_to_submode(on_tgt: NormalSubmodesMask) -> int:
if on_tgt == NormalSubmodesMask.SOLID_STATE_RELAYS_ADC_ON: if on_tgt == NormalSubmodesMask.SOLID_STATE_RELAYS_ADC_ON:
return 1 << NormalSubmodesMask.SOLID_STATE_RELAYS_ADC_ON return SubmodeForNormalMode.SSR_ON
if on_tgt == NormalSubmodesMask.DRO_ON: if on_tgt == NormalSubmodesMask.DRO_ON:
return 1 << NormalSubmodesMask.DRO_ON | ( return SubmodeForNormalMode.DRO_ON
1 << NormalSubmodesMask.SOLID_STATE_RELAYS_ADC_ON
)
if on_tgt == NormalSubmodesMask.X8_ON: if on_tgt == NormalSubmodesMask.X8_ON:
return ( return SubmodeForNormalMode.X8_ON
1 << NormalSubmodesMask.DRO_ON
| (1 << NormalSubmodesMask.SOLID_STATE_RELAYS_ADC_ON)
| (1 << NormalSubmodesMask.X8_ON)
)
if on_tgt == NormalSubmodesMask.TX_ON: if on_tgt == NormalSubmodesMask.TX_ON:
return ( return SubmodeForNormalMode.TX_ON
1 << NormalSubmodesMask.DRO_ON
| (1 << NormalSubmodesMask.SOLID_STATE_RELAYS_ADC_ON)
| (1 << NormalSubmodesMask.X8_ON)
| (1 << NormalSubmodesMask.TX_ON)
)
if on_tgt == NormalSubmodesMask.MPA_ON: if on_tgt == NormalSubmodesMask.MPA_ON:
return ( return SubmodeForNormalMode.MPA_ON
1 << NormalSubmodesMask.DRO_ON
| (1 << NormalSubmodesMask.SOLID_STATE_RELAYS_ADC_ON)
| (1 << NormalSubmodesMask.X8_ON)
| (1 << NormalSubmodesMask.TX_ON)
| (1 << NormalSubmodesMask.MPA_ON)
)
if on_tgt == NormalSubmodesMask.HPA_ON: if on_tgt == NormalSubmodesMask.HPA_ON:
return ( return SubmodeForNormalMode.HPA_ON
1 << NormalSubmodesMask.DRO_ON
| (1 << NormalSubmodesMask.SOLID_STATE_RELAYS_ADC_ON)
| (1 << NormalSubmodesMask.X8_ON)
| (1 << NormalSubmodesMask.TX_ON)
| (1 << NormalSubmodesMask.MPA_ON)
| (1 << NormalSubmodesMask.HPA_ON)
)
def pack_wait_time_cmd(q: DefaultPusQueueHelper, param_id: int, print_str: str): def pack_wait_time_cmd(q: DefaultPusQueueHelper, param_id: int, print_str: str):

View File

@ -75,8 +75,8 @@ class WdtInfo:
self.pw.dlog(wdt_info) self.pw.dlog(wdt_info)
for idx in range(len(self.wdt_reboots_list)): for idx in range(len(self.wdt_reboots_list)):
self.pw.dlog( self.pw.dlog(
f"{WDT_LIST[idx].ljust(5)} | " f"{WDT_LIST[idx].ljust(5)} | {self.wdt_reboots_list[idx]:010} |"
f"{self.wdt_reboots_list[idx]:010} | {self.time_pings_left_list[idx]:010}", f" {self.time_pings_left_list[idx]:010}",
) )
def parse(self, wdt_data: bytes, current_idx: int) -> int: def parse(self, wdt_data: bytes, current_idx: int) -> int:
@ -327,8 +327,9 @@ def handle_p60_hk_data(pw: PrintWrapper, set_id: int, hk_data: bytes):
) )
pw.dlog(misc_info) pw.dlog(misc_info)
batt_info = ( batt_info = (
f"Batt Temp 0 {batt_temp_0 / 10.0} | Batt Temp 1 {batt_temp_1 / 10.0} | " f"Batt Temp 0 {batt_temp_0 / 10.0} | Batt Temp 1 {batt_temp_1 / 10.0} |"
f"Charge Current {batt_charge_current} | Discharge Current {batt_discharge_current}" f" Charge Current {batt_charge_current} | Discharge Current"
f" {batt_discharge_current}"
) )
pw.dlog(batt_info) pw.dlog(batt_info)
pw.dlog( pw.dlog(
@ -419,12 +420,12 @@ def handle_acu_hk_data(pw: PrintWrapper, set_id: int, hk_data: bytes):
) )
pw.dlog(f"Boot Cause {boot_cause} | Reset Cause {reset_cause}") pw.dlog(f"Boot Cause {boot_cause} | Reset Cause {reset_cause}")
pw.dlog( pw.dlog(
f"Ground WDT: Reboot Count {wdt_cnt_gnd} | Time Left {wdt_gnd_time_left} sec" f"Ground WDT: Reboot Count {wdt_cnt_gnd} | Time Left"
f" {wdt_gnd_time_left} sec"
) )
pw.dlog( pw.dlog(
"ACU Dev Types: 0:FRAM|1:ADC|2:ADC|3:DAC|4:DAC|" "ACU Dev Types: 0:FRAM|1:ADC|2:ADC|3:DAC|4:DAC|5:DAC|6:TempSens|7:Reserved"
"5:DAC|6:TempSens|7:Reserved"
) )
dev_parser.print(pw=pw) dev_parser.print(pw=pw)
FsfwTmTcPrinter.get_validity_buffer( FsfwTmTcPrinter.get_validity_buffer(
@ -474,7 +475,8 @@ def pdu_config_table_handler(
pw.dlog("[tcs, syrlinks, str, mgt, sus-n, scex, ploc, acs-a, unused]") pw.dlog("[tcs, syrlinks, str, mgt, sus-n, scex, ploc, acs-a, unused]")
elif obj_id.as_bytes == PDU_2_HANDLER_ID: elif obj_id.as_bytes == PDU_2_HANDLER_ID:
pw.dlog( pw.dlog(
"[obc, pl-pcdu-bat-nom, rw, heaters, sus-r, sa-depl, pl-pcdu-bat-red, acs-b, pl-cam]" "[obc, pl-pcdu-bat-nom, rw, heaters, sus-r, sa-depl, pl-pcdu-bat-red,"
" acs-b, pl-cam]"
) )
out_on_cnt = unpack_array_in_data(custom_data, 0x52, 2, 9, "H") out_on_cnt = unpack_array_in_data(custom_data, 0x52, 2, 9, "H")
out_off_cnt = unpack_array_in_data(custom_data, 0x64, 2, 9, "H") out_off_cnt = unpack_array_in_data(custom_data, 0x64, 2, 9, "H")

View File

@ -1 +1,2 @@
from .tm import * # noqa from .tm import * # noqa
from .tmp1075 import add_tmp_sens_cmds

View File

@ -0,0 +1,92 @@
from eive_tmtc.config.definitions import CustomServiceList
from eive_tmtc.config.object_ids import TCS_CONTROLLER
from eive_tmtc.tmtc.tcs import CtrlSetId
from eive_tmtc.tmtc.tcs.brd_assy import pack_tcs_ass_cmds
from tmtccmd.config.tmtc import (
tmtc_definitions_provider,
TmtcDefinitionWrapper,
OpCodeEntry,
)
from tmtccmd.tc import DefaultPusQueueHelper
from tmtccmd.tc.pus_3_fsfw_hk import (
make_sid,
generate_one_hk_command,
create_request_one_diag_command,
create_request_one_hk_command,
create_enable_periodic_hk_command_with_interval_with_diag,
)
class OpCode:
REQUEST_PRIMARY_TEMP_SET = "temp"
ENABLE_TEMP_SET = "enable_temp_set"
REQUEST_DEVICE_TEMP_SET = "temp_devs"
REQUEST_DEVICE_SUS_SET = "temp_sus"
REQUEST_HEATER_INFO = "heater_info"
REQUEST_TCS_CTRL_INFO = "tcs_ctrl_info"
class Info:
ENABLE_TEMP_SET = "Enable Primary Temperature Set"
REQUEST_PRIMARY_TEMP_SET = "Request HK set of primary sensor temperatures"
REQUEST_DEVICE_TEMP_SET = "Request HK set of device sensor temperatures"
REQUEST_DEVICE_SUS_SET = "Request HK set of the SUS temperatures"
REQUEST_HEATER_INFO = "Request heater information"
REQUEST_TCS_CTRL_INFO = "Request TCS controller information"
def pack_tcs_ctrl_commands(q: DefaultPusQueueHelper, op_code: str):
if op_code == OpCode.REQUEST_PRIMARY_TEMP_SET:
sensor_set_sid = make_sid(TCS_CONTROLLER, CtrlSetId.PRIMARY_SENSORS)
q.add_log_cmd(Info.REQUEST_PRIMARY_TEMP_SET)
q.add_pus_tc(generate_one_hk_command(sensor_set_sid))
if op_code == OpCode.REQUEST_DEVICE_TEMP_SET:
q.add_log_cmd(Info.REQUEST_DEVICE_TEMP_SET)
q.add_pus_tc(
generate_one_hk_command(make_sid(TCS_CONTROLLER, CtrlSetId.DEVICE_SENSORS))
)
if op_code == OpCode.REQUEST_DEVICE_SUS_SET:
q.add_log_cmd(Info.REQUEST_DEVICE_SUS_SET)
q.add_pus_tc(
generate_one_hk_command(
make_sid(TCS_CONTROLLER, CtrlSetId.SUS_TEMP_SENSORS)
)
)
if op_code == OpCode.REQUEST_HEATER_INFO:
q.add_log_cmd(Info.REQUEST_HEATER_INFO)
q.add_pus_tc(
create_request_one_diag_command(
make_sid(TCS_CONTROLLER, CtrlSetId.HEATER_INFO)
)
)
if op_code == OpCode.REQUEST_TCS_CTRL_INFO:
q.add_log_cmd(Info.REQUEST_TCS_CTRL_INFO)
q.add_pus_tc(
create_request_one_hk_command(
make_sid(TCS_CONTROLLER, CtrlSetId.TCS_CTRL_INFO)
)
)
if op_code == OpCode.ENABLE_TEMP_SET:
interval_seconds = float(input("Please specify interval in seconds: "))
cmds = create_enable_periodic_hk_command_with_interval_with_diag(
False, make_sid(TCS_CONTROLLER, CtrlSetId.PRIMARY_SENSORS), interval_seconds
)
for cmd in cmds:
q.add_pus_tc(cmd)
pack_tcs_ass_cmds(q, op_code)
@tmtc_definitions_provider
def add_tcs_ctrl_cmds(defs: TmtcDefinitionWrapper):
oce = OpCodeEntry()
oce.add(keys=OpCode.ENABLE_TEMP_SET, info=Info.ENABLE_TEMP_SET)
oce.add(keys=OpCode.REQUEST_PRIMARY_TEMP_SET, info=Info.REQUEST_PRIMARY_TEMP_SET)
oce.add(keys=OpCode.REQUEST_DEVICE_TEMP_SET, info=Info.REQUEST_DEVICE_TEMP_SET)
oce.add(keys=OpCode.REQUEST_DEVICE_SUS_SET, info=Info.REQUEST_DEVICE_SUS_SET)
oce.add(keys=OpCode.REQUEST_HEATER_INFO, info=Info.REQUEST_HEATER_INFO)
oce.add(keys=OpCode.REQUEST_TCS_CTRL_INFO, info=Info.REQUEST_TCS_CTRL_INFO)
defs.add_service(
name=CustomServiceList.TCS_CTRL,
info="TCS controller",
op_code_entry=oce,
)

View File

@ -6,3 +6,22 @@ class CtrlSetId(enum.IntEnum):
DEVICE_SENSORS = 1 DEVICE_SENSORS = 1
SUS_TEMP_SENSORS = 2 SUS_TEMP_SENSORS = 2
HEATER_INFO = 4 HEATER_INFO = 4
TCS_CTRL_INFO = 5
class TcsSubmode(enum.IntEnum):
DEFAULT = 0
NO_HEATER_CTRL = 1
class Heater(enum.IntEnum):
HEATER_0_PLOC_PROC_BRD = 0
HEATER_1_PCDU_BRD = 1
HEATER_2_ACS_BRD = 2
HEATER_3_OBC_BRD = 3
HEATER_4_CAMERA = 4
HEATER_5_STR = 5
HEATER_6_DRO = 6
HEATER_7_SYRLINKS = 7
NUMBER_OF_SWITCHES = 8
NONE = 0xFF

View File

@ -7,6 +7,7 @@ import enum
from eive_tmtc.config.definitions import CustomServiceList from eive_tmtc.config.definitions import CustomServiceList
from eive_tmtc.config.object_ids import get_object_ids from eive_tmtc.config.object_ids import get_object_ids
from eive_tmtc.tmtc.tcs.defs import Heater
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
from tmtccmd.config.tmtc import tmtc_definitions_provider from tmtccmd.config.tmtc import tmtc_definitions_provider
from tmtccmd.tc import DefaultPusQueueHelper from tmtccmd.tc import DefaultPusQueueHelper
@ -20,18 +21,6 @@ from tmtccmd.pus.s8_fsfw_funccmd import create_action_cmd
from spacepackets.ecss.tc import PusTelecommand from spacepackets.ecss.tc import PusTelecommand
class Heater(enum.IntEnum):
HEATER_0_PLOC_PROC_BRD = 0
HEATER_1_PCDU_BRD = 1
HEATER_2_ACS_BRD = 2
HEATER_3_OBC_BRD = 3
HEATER_4_CAMERA = 4
HEATER_5_STR = 5
HEATER_6_DRO = 6
HEATER_7_SYRLINKS = 7
NUMBER_OF_SWITCHES = 8
HEATER_LOCATION = [ HEATER_LOCATION = [
"PLOC Processing Board", "PLOC Processing Board",
"PCDU PDU", "PCDU PDU",

View File

@ -1,6 +1,5 @@
from .defs import CtrlSetId
from eive_tmtc.config.definitions import CustomServiceList from eive_tmtc.config.definitions import CustomServiceList
from eive_tmtc.config.object_ids import TCS_CONTROLLER, TCS_SUBSYSTEM_ID from eive_tmtc.config.object_ids import TCS_SUBSYSTEM_ID
from eive_tmtc.tmtc.common import pack_mode_cmd_with_info from eive_tmtc.tmtc.common import pack_mode_cmd_with_info
from eive_tmtc.tmtc.tcs.brd_assy import pack_tcs_ass_cmds from eive_tmtc.tmtc.tcs.brd_assy import pack_tcs_ass_cmds
from tmtccmd.config.tmtc import ( from tmtccmd.config.tmtc import (
@ -10,64 +9,28 @@ from tmtccmd.config.tmtc import (
) )
from tmtccmd.tc import DefaultPusQueueHelper from tmtccmd.tc import DefaultPusQueueHelper
from tmtccmd.tc.pus_200_fsfw_mode import Mode, create_announce_mode_recursive_command from tmtccmd.tc.pus_200_fsfw_mode import Mode, create_announce_mode_recursive_command
from tmtccmd.tc.pus_3_fsfw_hk import (
make_sid,
generate_one_hk_command,
create_request_one_diag_command,
)
class OpCodeSys: class OpCode:
OFF = ["off"] OFF = "off"
NML = ["nml"] NML = "nml"
REQUEST_PRIMARY_TEMP_SET = ["temp"]
REQUEST_DEVICE_TEMP_SET = ["temp_devs"]
REQUEST_DEVICE_SUS_SET = ["temp_sus"]
REQUEST_HEATER_INFO = "heater_info"
ANNOUNCE_MODES = "announce_modes" ANNOUNCE_MODES = "announce_modes"
class InfoSys: class InfoSys:
OFF = "Switch TCS subsystem OFF" OFF = "Switch TCS subsystem OFF"
NML = "Switch TCS subsystem NORMAL (nominal)" NML = "Switch TCS subsystem NORMAL (nominal)"
REQUEST_PRIMARY_TEMP_SET = "Request HK set of primary sensor temperatures"
REQUEST_DEVICE_TEMP_SET = "Request HK set of device sensor temperatures"
REQUEST_DEVICE_SUS_SET = "Request HK set of the SUS temperatures"
REQUEST_HEATER_INFO = "Request heater information"
ANNOUNCE_MODES = "Announce Modes recursively" ANNOUNCE_MODES = "Announce Modes recursively"
def pack_tcs_sys_commands(q: DefaultPusQueueHelper, op_code: str): def pack_tcs_sys_commands(q: DefaultPusQueueHelper, op_code: str):
if op_code in OpCodeSys.REQUEST_PRIMARY_TEMP_SET: if op_code == OpCode.OFF:
sensor_set_sid = make_sid(TCS_CONTROLLER, CtrlSetId.PRIMARY_SENSORS)
q.add_log_cmd(InfoSys.REQUEST_PRIMARY_TEMP_SET)
q.add_pus_tc(generate_one_hk_command(sensor_set_sid))
if op_code in OpCodeSys.REQUEST_DEVICE_TEMP_SET:
q.add_log_cmd(InfoSys.REQUEST_DEVICE_TEMP_SET)
q.add_pus_tc(
generate_one_hk_command(make_sid(TCS_CONTROLLER, CtrlSetId.DEVICE_SENSORS))
)
if op_code in OpCodeSys.REQUEST_DEVICE_SUS_SET:
q.add_log_cmd(InfoSys.REQUEST_DEVICE_SUS_SET)
q.add_pus_tc(
generate_one_hk_command(
make_sid(TCS_CONTROLLER, CtrlSetId.SUS_TEMP_SENSORS)
)
)
if op_code == OpCodeSys.REQUEST_HEATER_INFO:
q.add_log_cmd(InfoSys.REQUEST_HEATER_INFO)
q.add_pus_tc(
create_request_one_diag_command(
make_sid(TCS_CONTROLLER, CtrlSetId.HEATER_INFO)
)
)
if op_code in OpCodeSys.OFF:
q.add_log_cmd(InfoSys.OFF) q.add_log_cmd(InfoSys.OFF)
pack_mode_cmd_with_info(TCS_SUBSYSTEM_ID, Mode.OFF, 0, q, InfoSys.OFF) pack_mode_cmd_with_info(TCS_SUBSYSTEM_ID, Mode.OFF, 0, q, InfoSys.OFF)
if op_code in OpCodeSys.NML: if op_code == OpCode.NML:
q.add_log_cmd(InfoSys.NML) q.add_log_cmd(InfoSys.NML)
pack_mode_cmd_with_info(TCS_SUBSYSTEM_ID, Mode.NORMAL, 0, q, InfoSys.OFF) pack_mode_cmd_with_info(TCS_SUBSYSTEM_ID, Mode.NORMAL, 0, q, InfoSys.OFF)
if op_code == OpCodeSys.ANNOUNCE_MODES: if op_code == OpCode.ANNOUNCE_MODES:
q.add_log_cmd(InfoSys.ANNOUNCE_MODES) q.add_log_cmd(InfoSys.ANNOUNCE_MODES)
q.add_pus_tc(create_announce_mode_recursive_command(TCS_SUBSYSTEM_ID)) q.add_pus_tc(create_announce_mode_recursive_command(TCS_SUBSYSTEM_ID))
pack_tcs_ass_cmds(q, op_code) pack_tcs_ass_cmds(q, op_code)
@ -76,19 +39,11 @@ def pack_tcs_sys_commands(q: DefaultPusQueueHelper, op_code: str):
@tmtc_definitions_provider @tmtc_definitions_provider
def add_tcs_subsystem_cmds(defs: TmtcDefinitionWrapper): def add_tcs_subsystem_cmds(defs: TmtcDefinitionWrapper):
oce = OpCodeEntry() oce = OpCodeEntry()
oce.add(keys=OpCodeSys.OFF, info=InfoSys.OFF) oce.add(keys=OpCode.OFF, info=InfoSys.OFF)
oce.add(keys=OpCodeSys.NML, info=InfoSys.NML) oce.add(keys=OpCode.NML, info=InfoSys.NML)
oce.add( oce.add(keys=OpCode.ANNOUNCE_MODES, info=InfoSys.ANNOUNCE_MODES)
keys=OpCodeSys.REQUEST_PRIMARY_TEMP_SET, info=InfoSys.REQUEST_PRIMARY_TEMP_SET
)
oce.add(
keys=OpCodeSys.REQUEST_DEVICE_TEMP_SET, info=InfoSys.REQUEST_DEVICE_TEMP_SET
)
oce.add(keys=OpCodeSys.REQUEST_DEVICE_SUS_SET, info=InfoSys.REQUEST_DEVICE_SUS_SET)
oce.add(keys=OpCodeSys.REQUEST_HEATER_INFO, info=InfoSys.REQUEST_HEATER_INFO)
oce.add(keys=OpCodeSys.ANNOUNCE_MODES, info=InfoSys.ANNOUNCE_MODES)
defs.add_service( defs.add_service(
name=CustomServiceList.TCS, name=CustomServiceList.TCS_SS,
info="TCS Board", info="TCS subsystem",
op_code_entry=oce, op_code_entry=oce,
) )

View File

@ -1,7 +1,11 @@
import dataclasses
import datetime
import enum
import logging import logging
import struct import struct
from eive_tmtc.pus_tm.defs import PrintWrapper from eive_tmtc.pus_tm.defs import PrintWrapper
from eive_tmtc.tmtc.tcs.defs import Heater
from tmtccmd.fsfw import validity_buffer_list from tmtccmd.fsfw import validity_buffer_list
from tmtccmd.util import ObjectIdU32 from tmtccmd.util import ObjectIdU32
from .defs import CtrlSetId from .defs import CtrlSetId
@ -11,7 +15,46 @@ from .heater import HEATER_LOCATION
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
def handle_thermal_controller_hk_data( class ThermalComponent(enum.IntEnum):
NONE = 0
ACS_BOARD = 1
MGT = 2
RW = 3
STR = 4
IF_BOARD = 5
TCS_BOARD = 6
OBC = 7
LEGACY_OBCIF_BOARD = 8
SBAND_TRANSCEIVER = 9
PCDUP60_BOARD = 10
PCDUACU = 11
PCDUPDU = 12
PLPCDU_BOARD = 13
PLOCMISSION_BOARD = 14
PLOCPROCESSING_BOARD = 15
DAC = 16
CAMERA = 17
DRO = 18
X8 = 19
HPA = 20
TX = 21
MPA = 22
SCEX_BOARD = 23
NUM_ENTRIES = 24
@dataclasses.dataclass
class TcsCtrlComponentInfo:
component: ThermalComponent
# Heater on or off?
state: bool
used_sensor_idx: int
used_heater: Heater
start_time: datetime.datetime
end_time: datetime.datetime
def handle_thermal_controller_hk_data( # noqa C901: complexity is okay.
object_id: ObjectIdU32, pw: PrintWrapper, set_id: int, hk_data: bytes object_id: ObjectIdU32, pw: PrintWrapper, set_id: int, hk_data: bytes
): ):
# need a better solutuon for this is this is used again.. # need a better solutuon for this is this is used again..
@ -119,5 +162,50 @@ def handle_thermal_controller_hk_data(
) )
current_draw = struct.unpack("!H", hk_data[8:10])[0] current_draw = struct.unpack("!H", hk_data[8:10])[0]
print(f"Heater Power Channel Current Draw: {current_draw} mA") print(f"Heater Power Channel Current Draw: {current_draw} mA")
elif set_id == CtrlSetId.TCS_CTRL_INFO:
pw.dlog("Received TCS CTRL information set")
current_idx = 0
heater_states = hk_data[0 : ThermalComponent.NUM_ENTRIES]
current_idx += ThermalComponent.NUM_ENTRIES
used_sensor_idx = hk_data[
current_idx : current_idx + ThermalComponent.NUM_ENTRIES
]
current_idx += ThermalComponent.NUM_ENTRIES
used_heater_idx = hk_data[
current_idx : current_idx + ThermalComponent.NUM_ENTRIES
]
current_idx += ThermalComponent.NUM_ENTRIES
start_and_end_time_fmt_str = "!IIIIIIIIIIIIIIIIIIIIIIII"
data_len = struct.calcsize(start_and_end_time_fmt_str)
start_times = struct.unpack(
start_and_end_time_fmt_str, hk_data[current_idx : current_idx + data_len]
)
current_idx += data_len
end_times = struct.unpack(
start_and_end_time_fmt_str, hk_data[current_idx : current_idx + data_len]
)
current_idx += data_len
component_list = []
for i in range(ThermalComponent.NUM_ENTRIES):
info = TcsCtrlComponentInfo(
component=ThermalComponent(i),
state=bool(heater_states[i]),
used_sensor_idx=used_sensor_idx[i],
used_heater=Heater(used_heater_idx[i]),
start_time=datetime.datetime.fromtimestamp(
start_times[i], datetime.timezone.utc
),
end_time=datetime.datetime.fromtimestamp(
end_times[i], datetime.timezone.utc
),
)
component_str = f"{info.component!r}".ljust(46)
state_str = "ON" if info.state else "OFF"
pw.dlog(
f"{component_str}: {state_str.ljust(4)} | Sensor Index "
f"{info.used_sensor_idx} | {info.used_heater!r} | Start "
f"{info.start_time} | End {info.end_time}"
)
component_list.append(info)
else: else:
_LOGGER.warning(f"Unimplemented set ID {set_id}") _LOGGER.warning(f"Unimplemented set ID {set_id}")

View File

@ -6,14 +6,17 @@
@date 06.01.2021 @date 06.01.2021
""" """
import enum import enum
import struct
from eive_tmtc.config.definitions import CustomServiceList from eive_tmtc.config.definitions import CustomServiceList
from eive_tmtc.pus_tm.defs import PrintWrapper
from spacepackets.ecss.tc import PusTelecommand from spacepackets.ecss.tc import PusTelecommand
from tmtccmd.config.tmtc import ( from tmtccmd.config.tmtc import (
tmtc_definitions_provider, tmtc_definitions_provider,
TmtcDefinitionWrapper, TmtcDefinitionWrapper,
OpCodeEntry, OpCodeEntry,
) )
from tmtccmd.fsfw.tmtc_printer import FsfwTmTcPrinter
from tmtccmd.tc import DefaultPusQueueHelper from tmtccmd.tc import DefaultPusQueueHelper
from tmtccmd.tc.pus_200_fsfw_mode import Mode, pack_mode_data from tmtccmd.tc.pus_200_fsfw_mode import Mode, pack_mode_data
from tmtccmd.tc.pus_3_fsfw_hk import create_request_one_hk_command, make_sid from tmtccmd.tc.pus_3_fsfw_hk import create_request_one_hk_command, make_sid
@ -76,3 +79,10 @@ def add_tmp_sens_cmds(defs: TmtcDefinitionWrapper):
oce.add(OpCode.NML, Info.NML) oce.add(OpCode.NML, Info.NML)
oce.add(OpCode.HK, Info.HK) oce.add(OpCode.HK, Info.HK)
defs.add_service(CustomServiceList.TMP1075.value, "TMP1075 Temperature Sensor", oce) defs.add_service(CustomServiceList.TMP1075.value, "TMP1075 Temperature Sensor", oce)
def handle_tmp_1075_hk_data(set_id: int, hk_data: bytes, pw: PrintWrapper):
if set_id == SetId.TEMPERATURE:
temp = struct.unpack("!f", hk_data[0:4])[0]
pw.dlog(f"TMP1075 Temperature: {temp}")
pw.dlog(FsfwTmTcPrinter.get_validity_buffer(hk_data[4:], 1))

View File

@ -148,8 +148,8 @@ def time_prompt_offset_from_now() -> datetime.datetime:
seconds_offset = math.floor( seconds_offset = math.floor(
float( float(
input( input(
"Please enter the time as a offset from now in seconds. Negative offset is " "Please enter the time as a offset from now in seconds. Negative offset"
"allowed: " " is allowed: "
) )
) )
) )

Binary file not shown.

BIN
filetest/fake_10kb.bin Normal file

Binary file not shown.

BIN
filetest/fake_20kb.bin Normal file

Binary file not shown.

BIN
filetest/fake_2_5kb.bin Normal file

Binary file not shown.

View File

@ -32,8 +32,8 @@ def main():
if not os.path.exists("setup.cfg"): if not os.path.exists("setup.cfg"):
additional_flags_second_step += " --max-line-length=100" additional_flags_second_step += " --max-line-length=100"
flake8_second_step_cmd = ( flake8_second_step_cmd = (
f"{python_exe} flake8 . {additional_flags_both_steps} {additional_flags_second_step}" f"{python_exe} flake8 . {additional_flags_both_steps} "
f" {exclude_dirs_flag}" f" {additional_flags_second_step} {exclude_dirs_flag}"
) )
os.system(flake8_second_step_cmd) os.system(flake8_second_step_cmd)

View File

@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
name = "eive-tmtc" name = "eive-tmtc"
description = "TMTC Commander EIVE" description = "TMTC Commander EIVE"
readme = "README.md" readme = "README.md"
dynamic = ["version"] version = "5.5.1"
requires-python = ">=3.10" requires-python = ">=3.10"
license = {text = "Apache-2.0"} license = {text = "Apache-2.0"}
authors = [ authors = [
@ -29,9 +29,8 @@ classifiers = [
"Topic :: Scientific/Engineering" "Topic :: Scientific/Engineering"
] ]
dependencies = [ dependencies = [
"tmtccmd ~= 5.0.0rc0", "tmtccmd == 6.0.0rc0",
"python-dateutil ~= 2.8", "python-dateutil ~= 2.8",
# tmtccmd @ git+https://github.com/robamu-org/tmtccmd@<gitRev>#egg=tmtccmd
] ]
[project.urls] [project.urls]
@ -40,9 +39,6 @@ dependencies = [
[tool.setuptools] [tool.setuptools]
include-package-data = true include-package-data = true
[tool.setuptools.dynamic]
version = {attr = "eive_tmtc.__version__"}
# Auto-Discovery is problematic for some reason, so use custom-discovery # Auto-Discovery is problematic for some reason, so use custom-discovery
[tool.setuptools.packages] [tool.setuptools.packages]
find = {} find = {}

View File

@ -3,7 +3,7 @@ Checklist for new releases
# Pre-Release # Pre-Release
1. Bump version inside the `eive_tmtc/__init__.py` file. 1. Bump version inside the `pyproject.toml` file.
2. Update `CHANGELOG.md`: Convert `unreleased` section into version section 2. Update `CHANGELOG.md`: Convert `unreleased` section into version section
with date and new `unreleased`section. with date and new `unreleased`section.
3. Run auto-formatter with `black .` 3. Run auto-formatter with `black .`

View File

@ -2,10 +2,11 @@
import logging import logging
import sys import sys
import time import time
import traceback
from pathlib import Path from pathlib import Path
from typing import cast from typing import cast
from spacepackets.ecss import PusVerificator
from spacepackets.version import get_version as get_sp_version
from spacepackets.ccsds import SPACE_PACKET_HEADER_SIZE from spacepackets.ccsds import SPACE_PACKET_HEADER_SIZE
from spacepackets.cfdp import ( from spacepackets.cfdp import (
ConditionCode, ConditionCode,
@ -16,6 +17,8 @@ from spacepackets.cfdp import (
PduFactory, PduFactory,
PduType, PduType,
) )
import tmtccmd
from tmtccmd.logging import add_colorlog_console_logger from tmtccmd.logging import add_colorlog_console_logger
from tmtccmd.cfdp import CfdpUserBase, TransactionId from tmtccmd.cfdp import CfdpUserBase, TransactionId
from tmtccmd.cfdp.defs import CfdpRequestType from tmtccmd.cfdp.defs import CfdpRequestType
@ -32,28 +35,6 @@ from tmtccmd.cfdp.user import (
FileSegmentRecvdParams, FileSegmentRecvdParams,
) )
from tmtccmd.tc.handler import SendCbParams from tmtccmd.tc.handler import SendCbParams
try:
import spacepackets
except ImportError as error:
print(error)
print("Python spacepackets module could not be imported")
print(
'Install with "cd spacepackets && python3 -m pip intall -e ." for interative installation'
)
sys.exit(1)
try:
import tmtccmd
except ImportError:
run_tmtc_commander = None
initialize_tmtc_commander = None
tb = traceback.format_exc()
print(tb)
print("Python tmtccmd submodule could not be imported")
sys.exit(1)
from spacepackets.ecss import PusVerificator
from tmtccmd import TcHandlerBase, BackendBase from tmtccmd import TcHandlerBase, BackendBase
from tmtccmd.util import FileSeqCountProvider, PusFileSeqCountProvider from tmtccmd.util import FileSeqCountProvider, PusFileSeqCountProvider
from tmtccmd.fsfw.tmtc_printer import FsfwTmTcPrinter from tmtccmd.fsfw.tmtc_printer import FsfwTmTcPrinter
@ -86,7 +67,7 @@ from tmtccmd.config.args import (
ProcedureParamsWrapper, ProcedureParamsWrapper,
) )
from eive_tmtc import APP_LOGGER from eive_tmtc import APP_LOGGER
from eive_tmtc import __version__ from importlib.metadata import version
from eive_tmtc.config.definitions import ( from eive_tmtc.config.definitions import (
PUS_APID, PUS_APID,
CFDP_APID, CFDP_APID,
@ -94,7 +75,7 @@ from eive_tmtc.config.definitions import (
CFDP_REMOTE_ENTITY_ID, CFDP_REMOTE_ENTITY_ID,
) )
from eive_tmtc.config.hook import EiveHookObject from eive_tmtc.config.hook import EiveHookObject
from eive_tmtc.pus_tm.factory_hook import pus_factory_hook from eive_tmtc.pus_tm.pus_demux import pus_factory_hook
from eive_tmtc.pus_tc.procedure_packer import handle_default_procedure from eive_tmtc.pus_tc.procedure_packer import handle_default_procedure
_LOGGER = APP_LOGGER _LOGGER = APP_LOGGER
@ -166,16 +147,20 @@ class PusHandler(SpecificApidHandlerBase):
wrapper: VerificationWrapper, wrapper: VerificationWrapper,
printer: FsfwTmTcPrinter, printer: FsfwTmTcPrinter,
raw_logger: RawTmtcTimedLogWrapper, raw_logger: RawTmtcTimedLogWrapper,
hk_level: int,
): ):
super().__init__(PUS_APID, None) super().__init__(PUS_APID, None)
self.printer = printer self.printer = printer
self.verif_wrapper = wrapper self.verif_wrapper = wrapper
self.raw_logger = raw_logger self.raw_logger = raw_logger
self.hk_level = hk_level
def handle_tm(self, packet: bytes, _user_args: any): def handle_tm(self, packet: bytes, _user_args: any):
# with open("tc.bin", "wb") as of: # with open("tc.bin", "wb") as of:
# of.write(packet) # of.write(packet)
pus_factory_hook(packet, self.verif_wrapper, self.printer, self.raw_logger) pus_factory_hook(
packet, self.verif_wrapper, self.printer, self.raw_logger, self.hk_level
)
class UnknownApidHandler(GenericApidHandlerBase): class UnknownApidHandler(GenericApidHandlerBase):
@ -207,7 +192,8 @@ class CfdpInCcsdsWrapper(SpecificApidHandlerBase):
_LOGGER.info("Received Finished PDU TM") _LOGGER.info("Received Finished PDU TM")
else: else:
_LOGGER.info( _LOGGER.info(
f"Received File Directive PDU with type {pdu_base.directive_type!r} TM" "Received File Directive PDU with type"
f" {pdu_base.directive_type!r} TM"
) )
self.handler.pass_pdu_packet(pdu_base) self.handler.pass_pdu_packet(pdu_base)
@ -307,7 +293,7 @@ class TcHandler(TcHandlerBase):
if pdu.pdu_directive_type == DirectiveType.METADATA_PDU: if pdu.pdu_directive_type == DirectiveType.METADATA_PDU:
metadata = pdu.to_metadata_pdu() metadata = pdu.to_metadata_pdu()
self.queue_helper.add_log_cmd( self.queue_helper.add_log_cmd(
f"CFDP Source: Sending Metadata PDU for file with size " "CFDP Source: Sending Metadata PDU for file with size "
f"{metadata.file_size}" f"{metadata.file_size}"
) )
elif pdu.pdu_directive_type == DirectiveType.EOF_PDU: elif pdu.pdu_directive_type == DirectiveType.EOF_PDU:
@ -317,7 +303,7 @@ class TcHandler(TcHandlerBase):
else: else:
fd_pdu = pdu.to_file_data_pdu() fd_pdu = pdu.to_file_data_pdu()
self.queue_helper.add_log_cmd( self.queue_helper.add_log_cmd(
f"CFDP Source: Sending File Data PDU for segment at offset " "CFDP Source: Sending File Data PDU for segment at offset "
f"{fd_pdu.offset} with length {len(fd_pdu.file_data)}" f"{fd_pdu.offset} with length {len(fd_pdu.file_data)}"
) )
self.queue_helper.add_ccsds_tc(sp) self.queue_helper.add_ccsds_tc(sp)
@ -329,19 +315,25 @@ class TcHandler(TcHandlerBase):
if info.proc_type == TcQueueEntryType.PUS_TC: if info.proc_type == TcQueueEntryType.PUS_TC:
def_proc = info.to_def_procedure() def_proc = info.to_def_procedure()
_LOGGER.info( _LOGGER.info(
f"Finished queue for service {def_proc.service} and op code {def_proc.op_code}" f"Finished queue for service {def_proc.service} and op code"
f" {def_proc.op_code}"
) )
elif info.proc_type == TcProcedureType.CFDP: elif info.proc_type == TcProcedureType.CFDP:
_LOGGER.info("Finished CFDP queue") _LOGGER.info("Finished CFDP queue")
def setup_params() -> SetupWrapper: def setup_params() -> (SetupWrapper, int):
hook_obj = EiveHookObject(default_json_path()) hook_obj = EiveHookObject(default_json_path())
params = SetupParams() params = SetupParams()
parser_wrapper = PreArgsParsingWrapper() parser_wrapper = PreArgsParsingWrapper()
parser_wrapper.create_default_parent_parser() parser_wrapper.create_default_parent_parser()
parser_wrapper.create_default_parser() parser_wrapper.create_default_parser()
parser_wrapper.add_def_proc_and_cfdp_as_subparsers() tmtc_parser, cfdp_parser = parser_wrapper.add_def_proc_and_cfdp_as_subparsers()
tmtc_parser.add_argument(
"--hk",
help="HK output level",
default=2,
)
post_arg_parsing_wrapper = parser_wrapper.parse( post_arg_parsing_wrapper = parser_wrapper.parse(
setup_params=params, hook_obj=hook_obj setup_params=params, hook_obj=hook_obj
) )
@ -352,13 +344,14 @@ def setup_params() -> SetupWrapper:
post_arg_parsing_wrapper.set_params_with_prompts(proc_param_wrapper) post_arg_parsing_wrapper.set_params_with_prompts(proc_param_wrapper)
else: else:
post_arg_parsing_wrapper.set_params_without_prompts(proc_param_wrapper) post_arg_parsing_wrapper.set_params_without_prompts(proc_param_wrapper)
hk_level = int(post_arg_parsing_wrapper.args_raw.hk)
params.apid = PUS_APID params.apid = PUS_APID
if params.com_if is None: if params.com_if is None:
raise ValueError("could not determine a COM interface.") raise ValueError("could not determine a COM interface.")
setup_wrapper = SetupWrapper( setup_wrapper = SetupWrapper(
hook_obj=hook_obj, setup_params=params, proc_param_wrapper=proc_param_wrapper hook_obj=hook_obj, setup_params=params, proc_param_wrapper=proc_param_wrapper
) )
return setup_wrapper return setup_wrapper, hk_level
def setup_cfdp_handler() -> CfdpInCcsdsWrapper: def setup_cfdp_handler() -> CfdpInCcsdsWrapper:
@ -400,12 +393,13 @@ def setup_tmtc_handlers(
printer: FsfwTmTcPrinter, printer: FsfwTmTcPrinter,
raw_logger: RawTmtcTimedLogWrapper, raw_logger: RawTmtcTimedLogWrapper,
gui: bool, gui: bool,
hk_level: int,
) -> (CcsdsTmHandler, TcHandler): ) -> (CcsdsTmHandler, TcHandler):
cfdp_in_ccsds_wrapper = setup_cfdp_handler() cfdp_in_ccsds_wrapper = setup_cfdp_handler()
verification_wrapper = VerificationWrapper( verification_wrapper = VerificationWrapper(
verificator, _LOGGER, printer.file_logger verificator, _LOGGER, printer.file_logger
) )
pus_handler = PusHandler(verification_wrapper, printer, raw_logger) pus_handler = PusHandler(verification_wrapper, printer, raw_logger, hk_level)
ccsds_handler = CustomCcsdsTmHandler(generic_handler=UnknownApidHandler(None)) ccsds_handler = CustomCcsdsTmHandler(generic_handler=UnknownApidHandler(None))
ccsds_handler.add_apid_handler(pus_handler) ccsds_handler.add_apid_handler(pus_handler)
ccsds_handler.add_apid_handler(cfdp_in_ccsds_wrapper) ccsds_handler.add_apid_handler(cfdp_in_ccsds_wrapper)
@ -438,13 +432,13 @@ def setup_backend(
def main(): # noqa C901: Complexity okay here. def main(): # noqa C901: Complexity okay here.
print(f"-- eive tmtc v{__version__} --") print(f"-- eive tmtc v{version('eive-tmtc')} --")
print(f"-- spacepackets v{spacepackets.__version__} --") print(f"-- spacepackets v{get_sp_version()} --")
add_colorlog_console_logger(_LOGGER) add_colorlog_console_logger(_LOGGER)
# TODO: -V CLI argument to enable this? # TODO: -V CLI argument to enable this?
_LOGGER.setLevel(_LOG_LEVEL) _LOGGER.setLevel(_LOG_LEVEL)
try: try:
setup_wrapper = setup_params() setup_wrapper, hk_level = setup_params()
except KeyboardInterrupt as e: except KeyboardInterrupt as e:
_LOGGER.info(f"{e}. Exiting") _LOGGER.info(f"{e}. Exiting")
sys.exit(0) sys.exit(0)
@ -457,7 +451,7 @@ def main(): # noqa C901: Complexity okay here.
) )
pus_verificator = PusVerificator() pus_verificator = PusVerificator()
ccsds_handler, tc_handler = setup_tmtc_handlers( ccsds_handler, tc_handler = setup_tmtc_handlers(
pus_verificator, printer, raw_logger, setup_wrapper.params.use_gui pus_verificator, printer, raw_logger, setup_wrapper.params.use_gui, hk_level
) )
tmtccmd.setup(setup_wrapper) tmtccmd.setup(setup_wrapper)