Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SRC OBDH TMTC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Robin Mueller
SRC OBDH TMTC
Commits
feda85f7
Commit
feda85f7
authored
4 years ago
by
Robin.Mueller
Browse files
Options
Downloads
Patches
Plain Diff
todo added
parent
00b7b9a3
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
config/obsw_config.py
+16
-0
16 additions, 0 deletions
config/obsw_config.py
config/obsw_user_code.py
+13
-10
13 additions, 10 deletions
config/obsw_user_code.py
tc/obsw_tc_service5_17.py
+1
-1
1 addition, 1 deletion
tc/obsw_tc_service5_17.py
tmtc_core
+1
-1
1 addition, 1 deletion
tmtc_core
with
31 additions
and
12 deletions
config/obsw_config.py
+
16
−
0
View file @
feda85f7
...
@@ -183,3 +183,19 @@ def set_globals(args):
...
@@ -183,3 +183,19 @@ def set_globals(args):
from
config.obsw_user_code
import
global_setup_hook
from
config.obsw_user_code
import
global_setup_hook
global_setup_hook
()
global_setup_hook
()
def
set_glob_apid
(
new_apid
:
int
):
global
G_APID
G_APID
=
new_apid
def
get_glob_apid
():
global
G_APID
return
G_APID
def
set_glob_com_if
(
new_com_if
:
ComInterfaces
):
global
G_COM_IF
G_COM_IF
=
new_com_if
def
get_glob_com_if
():
global
G_COM_IF
return
G_COM_IF
This diff is collapsed.
Click to expand it.
config/obsw_user_code.py
+
13
−
10
View file @
feda85f7
...
@@ -3,10 +3,13 @@ User defined code can be added here.
...
@@ -3,10 +3,13 @@ User defined code can be added here.
"""
"""
from
typing
import
Union
,
Tuple
from
typing
import
Union
,
Tuple
from
tmtc_core.tc.obsw_pus_tc_base
import
PusTcInfo
from
tmtc_core.tc.obsw_pus_tc_base
import
PusTcInfo
from
tmtc_core.tmtc_core_definitions
import
ComInterfaces
from
enum
import
Enum
from
enum
import
Enum
# Yeah, I did not have a better idea yet..
# TODO: We really need that JSON file which will not be tracked by version control.
# In that JSON file, we could set the current developer, so that developers can
# hook into the config.
class
Developer
(
Enum
):
class
Developer
(
Enum
):
Robin
=
0
Robin
=
0
...
@@ -22,24 +25,24 @@ def command_preparation_hook() -> Tuple[bytearray, Union[None, PusTcInfo]]:
...
@@ -22,24 +25,24 @@ def command_preparation_hook() -> Tuple[bytearray, Union[None, PusTcInfo]]:
return
prepare_robins_commands
()
return
prepare_robins_commands
()
def
prepare_robins_commands
():
from
tmtc_core.tc.obsw_pus_tc_base
import
PusTelecommand
command
=
PusTelecommand
(
service
=
17
,
subservice
=
1
,
ssc
=
20
)
return
command
.
pack_command_tuple
()
def
global_setup_hook
():
def
global_setup_hook
():
"""
"""
Can be used to alter the global variables in a custom defined way.
Can be used to alter the global variables in a custom defined way.
For example, device specific com ports or ethernet ports can be set here.
For example, device specific com ports or ethernet ports can be set here.
The global variables in the config.obsw_config file can be edited here
The global variables in the config.obsw_config file can be edited here
by using the handle.
by using the handle.
For example: config.obsw_config.G_ETHERNET_SEND_ADDRESS = new_send_address
"""
"""
if
Developer
==
Developer
.
Robin
:
if
Developer
==
Developer
.
Robin
:
global_setup_hook_robin
()
global_setup_hook_robin
()
def
prepare_robins_commands
():
from
tmtc_core.tc.obsw_pus_tc_base
import
PusTelecommand
command
=
PusTelecommand
(
service
=
17
,
subservice
=
1
,
ssc
=
20
)
return
command
.
pack_command_tuple
()
def
global_setup_hook_robin
():
def
global_setup_hook_robin
():
import
config.obsw_config
from
config.obsw_config
import
get_glob_com_if
,
set_glob_apid
pass
if
get_glob_com_if
()
==
ComInterfaces
.
Ethernet
:
# Configure APID for FSFW example. Set this back to 0x73 for STM32!
set_glob_apid
(
0xEF
)
This diff is collapsed.
Click to expand it.
tc/obsw_tc_service5_17.py
+
1
−
1
View file @
feda85f7
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
@author R. Mueller
@author R. Mueller
@date 02.05.2020
@date 02.05.2020
"""
"""
import
config.obsw_config
as
g
from
tc.obsw_pus_tc_packer
import
TcQueueT
,
PusTelecommand
from
tc.obsw_pus_tc_packer
import
TcQueueT
,
PusTelecommand
...
...
This diff is collapsed.
Click to expand it.
tmtc_core
@
440b94ce
Compare
db6aaef2
...
440b94ce
Subproject commit
db6aaef2824f19cfc3687ae63ec5480aeb0e4cb2
Subproject commit
440b94ce454f50d4078962806ef03942f56d466c
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment