openc3-cosmos-demo 5.19.0 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/requirements.txt +1 -0
- data/targets/INST/cmd_tlm/inst_tlm.txt +5 -0
- data/targets/INST/lib/sim_inst.rb +5 -0
- data/targets/INST/procedures/my_test_suite.rb +2 -2
- data/targets/INST/screens/commanding.txt +23 -9
- data/targets/INST/screens/hs.txt +1 -0
- data/targets/INST/screens/params.txt +11 -4
- data/targets/INST/screens/rollup.txt +1 -1
- data/targets/INST2/cmd_tlm/inst_tlm.txt +5 -0
- data/targets/INST2/lib/helper.py +1 -1
- data/targets/INST2/lib/sim_inst.py +5 -0
- data/targets/INST2/procedures/calendar.py +1 -1
- data/targets/INST2/procedures/collect.py +1 -1
- data/targets/INST2/procedures/my_script_suite.py +4 -4
- data/targets/INST2/procedures/my_test_suite.py +2 -2
- data/targets/INST2/procedures/numpy.py +11 -0
- data/targets/INST2/screens/commanding.txt +24 -10
- data/targets/INST2/screens/hs.txt +1 -0
- data/targets/INST2/screens/params.txt +11 -4
- data/targets/INST2/screens/rollup.txt +1 -1
- data/targets/SYSTEM/procedures/test.rb +0 -6
- data/tools/widgets/BigWidget/BigWidget.umd.min.js +1417 -2
- data/tools/widgets/BigWidget/BigWidget.umd.min.js.map +1 -1
- data/tools/widgets/DataviewerquaternionWidget/DataviewerquaternionWidget.umd.min.js +1428 -3
- data/tools/widgets/DataviewerquaternionWidget/DataviewerquaternionWidget.umd.min.js.map +1 -1
- data/tools/widgets/DataviewertimeWidget/DataviewertimeWidget.umd.min.js +1417 -2
- data/tools/widgets/DataviewertimeWidget/DataviewertimeWidget.umd.min.js.map +1 -1
- data/tools/widgets/HelloworldWidget/HelloworldWidget.umd.min.js +1417 -2
- data/tools/widgets/HelloworldWidget/HelloworldWidget.umd.min.js.map +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62e1ef14a867f3ee7d668f830576f2ec2fcbd87272e64ea525a3437bd347c53c
|
4
|
+
data.tar.gz: 5e99baf15bad60d6c3bd3d51476ebcdb1b63ee713c8abd67ae4cc1498f6c3228
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9fde26bd82bbb8f150ffca7f4e1272a82b44a741722ffc99e6d09acfa045fb984e161987e759673a5051bbf2076bc99187e71788b83b341644f4cc0fb13c9cc1
|
7
|
+
data.tar.gz: 39d85398ec9374fc2973c8d66ed82ff31b736b22921a57ca39c332038cce8ff9ed9d2ef8d8bd3c1018a296ff07b8d8916e9d20cbb80e0d8ff5f9113ef21a0a30
|
data/requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
numpy==2.1.1
|
@@ -127,6 +127,11 @@ TELEMETRY <%= target_name %> PARAMS BIG_ENDIAN "Params set by SETPARAMS command"
|
|
127
127
|
STATE GOOD 0 GREEN
|
128
128
|
STATE BAD 1 RED
|
129
129
|
<% end %>
|
130
|
+
APPEND_ITEM P_2.2,2 32 UINT "Test weird characters"
|
131
|
+
APPEND_ITEM P-3+3=3 32 UINT "Test weird characters"
|
132
|
+
APPEND_ITEM P4!@#$%^&*? 32 UINT "Test weird characters"
|
133
|
+
APPEND_ITEM P</5|\> 32 UINT "Test weird characters"
|
134
|
+
APPEND_ITEM P(:6;) 32 UINT "Test weird characters"
|
130
135
|
ITEM PACKET_TIME 0 0 DERIVED "Ruby time based on TIMESEC and TIMEUS"
|
131
136
|
READ_CONVERSION unix_time_conversion.rb TIMESEC TIMEUS
|
132
137
|
|
@@ -111,6 +111,11 @@ module OpenC3
|
|
111
111
|
packet.value3 = 2
|
112
112
|
packet.value4 = 1
|
113
113
|
packet.value5 = 0
|
114
|
+
packet.write('P_2.2,2', 2)
|
115
|
+
packet.write('P-3+3=3', 3)
|
116
|
+
packet.write('P4!@#$%^&*?', 4)
|
117
|
+
packet.write('P</5|\>', 5)
|
118
|
+
packet.write('P(:6;)', 6)
|
114
119
|
|
115
120
|
packet = @tlm_packets['IMAGE']
|
116
121
|
packet.enable_method_missing
|
@@ -12,14 +12,14 @@ class ExampleTest < OpenC3::Test
|
|
12
12
|
puts "continue past raise"
|
13
13
|
end
|
14
14
|
|
15
|
-
def
|
15
|
+
def test_req2
|
16
16
|
puts "Running #{OpenC3::Test.current_test_suite}:#{OpenC3::Test.current_test}:#{OpenC3::Test.current_test_case}"
|
17
17
|
OpenC3::Test.puts "This test verifies requirement 2"
|
18
18
|
helper()
|
19
19
|
wait(2)
|
20
20
|
end
|
21
21
|
|
22
|
-
def
|
22
|
+
def test_req3
|
23
23
|
puts "Running #{OpenC3::Test.current_test_suite}:#{OpenC3::Test.current_test}:#{OpenC3::Test.current_test_case}"
|
24
24
|
raise SkipTestCase
|
25
25
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
SCREEN AUTO AUTO 0.5
|
2
2
|
|
3
|
-
|
4
|
-
TITLE "<%= target_name %> Commanding Examples"
|
3
|
+
TITLE "<%= target_name %> Commanding Examples"
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
LABELVALUE <%= target_name %> HEALTH_STATUS COLLECTS
|
6
|
+
LABELVALUE <%= target_name %> HEALTH_STATUS COLLECT_TYPE
|
7
|
+
LABELVALUE <%= target_name %> HEALTH_STATUS DURATION
|
9
8
|
|
9
|
+
MATRIXBYCOLUMNS 2
|
10
10
|
VERTICALBOX "Send Collect Command:"
|
11
11
|
HORIZONTAL
|
12
12
|
LABEL "Type: "
|
@@ -32,11 +32,13 @@ VERTICAL
|
|
32
32
|
END
|
33
33
|
|
34
34
|
VERTICALBOX "Parameter-less Commands:"
|
35
|
-
|
36
|
-
|
37
|
-
|
35
|
+
HORIZONTAL
|
36
|
+
NAMED_WIDGET GROUP RADIOGROUP 1 # Select 'Clear' initially, 0-based index
|
37
|
+
RADIOBUTTON 'Abort'
|
38
|
+
RADIOBUTTON 'Clear'
|
39
|
+
END
|
40
|
+
NAMED_WIDGET CHECK CHECKBUTTON 'Ignore Hazardous Checks' # No option is by default UNCHECKED
|
38
41
|
END
|
39
|
-
NAMED_WIDGET CHECK CHECKBUTTON 'Ignore Hazardous Checks' # No option is by default UNCHECKED
|
40
42
|
BUTTON 'Send' "screen.getNamedWidget('GROUP').selected() === 0 ? " +
|
41
43
|
"api.cmd('<%= target_name %> ABORT') : (screen.getNamedWidget('CHECK').checked() ? " +
|
42
44
|
"api.cmd_no_hazardous_check('<%= target_name %> CLEAR') : api.cmd('<%= target_name %> CLEAR'))"
|
@@ -54,4 +56,16 @@ VERTICAL
|
|
54
56
|
"var env = {}; env['TYPE'] = ctype;" \
|
55
57
|
"runScript('<%= target_name %>/procedures/'+script, !screen.getNamedWidget('BG').checked(), env)"
|
56
58
|
END
|
59
|
+
|
60
|
+
VERTICALBOX "Date / Time Chooser"
|
61
|
+
HORIZONTAL 5
|
62
|
+
NAMED_WIDGET DATE Date "Input Date"
|
63
|
+
NAMED_WIDGET TIME Time
|
64
|
+
END
|
65
|
+
|
66
|
+
BUTTON 'Alert' "var date=screen.getNamedWidget('DATE').text();" +
|
67
|
+
"var time=screen.getNamedWidget('TIME').text();" +
|
68
|
+
# You can have comments between string concatenations
|
69
|
+
"alert('DATE:'+date+' TIME:'+time)"
|
70
|
+
END
|
57
71
|
END
|
data/targets/INST/screens/hs.txt
CHANGED
@@ -16,6 +16,7 @@ VERTICAL
|
|
16
16
|
VERTICALBOX "Temperatures"
|
17
17
|
LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP1 WITH_UNITS
|
18
18
|
LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP2 CONVERTED 25
|
19
|
+
SUBSETTING 2 WIDTH 160
|
19
20
|
# LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP2 RAW 20 # RAW is not allowed for LIMITSBAR widgets
|
20
21
|
LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP2 FORMATTED
|
21
22
|
LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP2 WITH_UNITS
|
@@ -3,7 +3,7 @@ SCREEN AUTO AUTO 1.0
|
|
3
3
|
VERTICAL
|
4
4
|
TITLE Params
|
5
5
|
|
6
|
-
HORIZONTAL
|
6
|
+
HORIZONTAL 20
|
7
7
|
MATRIXBYCOLUMNS 3
|
8
8
|
LABEL VALUE5
|
9
9
|
SETTING WIDTH 100 # Only need width on the first row
|
@@ -60,10 +60,17 @@ VERTICAL
|
|
60
60
|
SETTING LED_COLOR GOOD GREEN
|
61
61
|
SETTING LED_COLOR BAD RED
|
62
62
|
END
|
63
|
-
|
63
|
+
VERTICAL
|
64
|
+
LABELVALUE <%= target_name %> PARAMS P_2.2,2
|
65
|
+
LABELVALUE <%= target_name %> PARAMS P-3+3=3
|
66
|
+
LABELVALUE <%= target_name %> PARAMS P4!@#$%^&*?
|
67
|
+
LABELVALUE <%= target_name %> PARAMS P</5|\>
|
68
|
+
LABELVALUE <%= target_name %> PARAMS P(:6;)
|
69
|
+
END
|
64
70
|
END
|
65
71
|
|
66
|
-
|
67
|
-
|
72
|
+
HORIZONTAL
|
73
|
+
LABEL "Packet Time"
|
74
|
+
VALUE <%= target_name %> PARAMS PACKET_TIMEFORMATTED WITH_UNITS 25
|
68
75
|
END
|
69
76
|
END
|
@@ -11,7 +11,7 @@ HORIZONTAL
|
|
11
11
|
SETTING SCREEN <%= target_name %> LIMITS
|
12
12
|
SETTING TLM <%= target_name %> HEALTH_STATUS TEMP1
|
13
13
|
ROLLUP equipment "Processor" "CPU"
|
14
|
-
|
14
|
+
# No SCREEN should display without pointer cursor
|
15
15
|
SETTING TLM <%= target_name %> HEALTH_STATUS TEMP4
|
16
16
|
ROLLUP satellite-transmit "Satellite" "all temps"
|
17
17
|
SETTING SCREEN <%= target_name %> HS
|
@@ -119,6 +119,11 @@ TELEMETRY <%= target_name %> PARAMS BIG_ENDIAN "Params set by SETPARAMS command"
|
|
119
119
|
STATE GOOD 0 GREEN
|
120
120
|
STATE BAD 1 RED
|
121
121
|
<% end %>
|
122
|
+
APPEND_ITEM P_2.2,2 32 UINT "Test weird characters"
|
123
|
+
APPEND_ITEM P-3+3=3 32 UINT "Test weird characters"
|
124
|
+
APPEND_ITEM P4!@#$%^&*? 32 UINT "Test weird characters"
|
125
|
+
APPEND_ITEM P</5|\> 32 UINT "Test weird characters"
|
126
|
+
APPEND_ITEM P(:6;) 32 UINT "Test weird characters"
|
122
127
|
ITEM PACKET_TIME 0 0 DERIVED "Python time based on TIMESEC and TIMEUS"
|
123
128
|
READ_CONVERSION openc3/conversions/unix_time_conversion.py TIMESEC TIMEUS
|
124
129
|
|
data/targets/INST2/lib/helper.py
CHANGED
@@ -114,6 +114,11 @@ class SimInst(SimulatedTarget):
|
|
114
114
|
packet.write("value3", 2)
|
115
115
|
packet.write("value4", 1)
|
116
116
|
packet.write("value5", 0)
|
117
|
+
packet.write('P_2.2,2', 2)
|
118
|
+
packet.write('P-3+3=3', 3)
|
119
|
+
packet.write('P4!@#$%^&*?', 4)
|
120
|
+
packet.write('P</5|\>', 5)
|
121
|
+
packet.write('P(:6;)', 6)
|
117
122
|
|
118
123
|
packet = self.tlm_packets["IMAGE"]
|
119
124
|
packet.write("CcsdsSeqFlags", "NOGROUP")
|
@@ -21,7 +21,7 @@ print(
|
|
21
21
|
) # => {"name":"Mine", "color":"#4287f5", "scope":"DEFAULT", "updated_at":1698763720728596964}
|
22
22
|
|
23
23
|
now = datetime.now(timezone.utc)
|
24
|
-
start =
|
24
|
+
start = now + timedelta(hours=1)
|
25
25
|
stop = start + timedelta(hours=1) # Stop plus 1hr
|
26
26
|
act = create_timeline_activity("Mine", kind="reserve", start=start, stop=stop)
|
27
27
|
print(act) # =>
|
@@ -1,6 +1,8 @@
|
|
1
1
|
from openc3.script.suite import Group, Suite
|
2
2
|
|
3
3
|
load_utility("INST2/procedures/utilities/clear.py")
|
4
|
+
# Load a target file library (not instrumented)
|
5
|
+
from INST2.lib.helper import Helper
|
4
6
|
|
5
7
|
|
6
8
|
class ExampleGroup(Group):
|
@@ -30,6 +32,8 @@ class ExampleGroup(Group):
|
|
30
32
|
raise SkipScript
|
31
33
|
|
32
34
|
def helper(self):
|
35
|
+
helper = Helper()
|
36
|
+
helper.print_help()
|
33
37
|
if RunningScript.manual:
|
34
38
|
answer = ask("Are you sure?")
|
35
39
|
else:
|
@@ -43,7 +47,3 @@ class MySuite(Suite):
|
|
43
47
|
def __init__(self):
|
44
48
|
super().__init__()
|
45
49
|
self.add_group(ExampleGroup)
|
46
|
-
|
47
|
-
|
48
|
-
print("Running")
|
49
|
-
MySuite().run()
|
@@ -13,7 +13,7 @@ class ExampleTest(Test):
|
|
13
13
|
raise RuntimeError("error")
|
14
14
|
print("continue past raise") # NOSONAR
|
15
15
|
|
16
|
-
def
|
16
|
+
def test_req2(self):
|
17
17
|
print(
|
18
18
|
f"Running {Test.current_test_suite()}:{Test.current_test()}:{Test.current_test_case()}"
|
19
19
|
)
|
@@ -21,7 +21,7 @@ class ExampleTest(Test):
|
|
21
21
|
self.helper()
|
22
22
|
wait(2)
|
23
23
|
|
24
|
-
def
|
24
|
+
def test_req3(self):
|
25
25
|
print(
|
26
26
|
f"Running {Test.current_test_suite()}:{Test.current_test()}:{Test.current_test_case()}"
|
27
27
|
)
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# The standard way to import NumPy:
|
2
|
+
import numpy as np
|
3
|
+
|
4
|
+
# Create a 2-D array, set every second element in
|
5
|
+
# some rows and find max per row:
|
6
|
+
x = np.arange(15, dtype=np.int64).reshape(3, 5)
|
7
|
+
x[1:, ::2] = -99
|
8
|
+
print(x)
|
9
|
+
# array([[ 0, 1, 2, 3, 4],
|
10
|
+
# [-99, 6, -99, 8, -99],
|
11
|
+
# [-99, 11, -99, 13, -99]])
|
@@ -1,12 +1,12 @@
|
|
1
1
|
SCREEN AUTO AUTO 0.5
|
2
2
|
|
3
|
-
|
4
|
-
TITLE "<%= target_name %> Commanding Examples"
|
3
|
+
TITLE "<%= target_name %> Commanding Examples"
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
LABELVALUE <%= target_name %> HEALTH_STATUS COLLECTS
|
6
|
+
LABELVALUE <%= target_name %> HEALTH_STATUS COLLECT_TYPE
|
7
|
+
LABELVALUE <%= target_name %> HEALTH_STATUS DURATION
|
9
8
|
|
9
|
+
MATRIXBYCOLUMNS 2
|
10
10
|
VERTICALBOX "Send Collect Command:"
|
11
11
|
HORIZONTAL
|
12
12
|
LABEL "Type: "
|
@@ -32,11 +32,13 @@ VERTICAL
|
|
32
32
|
END
|
33
33
|
|
34
34
|
VERTICALBOX "Parameter-less Commands:"
|
35
|
-
|
36
|
-
|
37
|
-
|
35
|
+
HORIZONTAL
|
36
|
+
NAMED_WIDGET GROUP RADIOGROUP 1 # Select 'Clear' initially, 0-based index
|
37
|
+
RADIOBUTTON 'Abort'
|
38
|
+
RADIOBUTTON 'Clear'
|
39
|
+
END
|
40
|
+
NAMED_WIDGET CHECK CHECKBUTTON 'Ignore Hazardous Checks' # No option is by default UNCHECKED
|
38
41
|
END
|
39
|
-
NAMED_WIDGET CHECK CHECKBUTTON 'Ignore Hazardous Checks' # No option is by default UNCHECKED
|
40
42
|
BUTTON 'Send' "screen.getNamedWidget('GROUP').selected() === 0 ? " +
|
41
43
|
"api.cmd('<%= target_name %> ABORT') : (screen.getNamedWidget('CHECK').checked() ? " +
|
42
44
|
"api.cmd_no_hazardous_check('<%= target_name %> CLEAR') : api.cmd('<%= target_name %> CLEAR'))"
|
@@ -50,8 +52,20 @@ VERTICAL
|
|
50
52
|
BUTTON 'Run Script' "var script=screen.getNamedWidget('SCRIPTNAME').text();" \
|
51
53
|
"var ctype=screen.getNamedWidget('COLLECT_TYPE').text();" \
|
52
54
|
# Set some environment variables to be used by the script as ENV['TYPE']
|
53
|
-
# See INST2/procedures/checks.
|
55
|
+
# See INST2/procedures/checks.py for an example of usage
|
54
56
|
"var env = {}; env['TYPE'] = ctype;" \
|
55
57
|
"runScript('<%= target_name %>/procedures/'+script, !screen.getNamedWidget('BG').checked(), env)"
|
56
58
|
END
|
59
|
+
|
60
|
+
VERTICALBOX "Date / Time Chooser"
|
61
|
+
HORIZONTAL 5
|
62
|
+
NAMED_WIDGET DATE Date "Input Date"
|
63
|
+
NAMED_WIDGET TIME Time
|
64
|
+
END
|
65
|
+
|
66
|
+
BUTTON 'Alert' "var date=screen.getNamedWidget('DATE').text();" +
|
67
|
+
"var time=screen.getNamedWidget('TIME').text();" +
|
68
|
+
# You can have comments between string concatenations
|
69
|
+
"alert('DATE:'+date+' TIME:'+time)"
|
70
|
+
END
|
57
71
|
END
|
@@ -16,6 +16,7 @@ VERTICAL
|
|
16
16
|
VERTICALBOX "Temperatures"
|
17
17
|
LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP1 WITH_UNITS
|
18
18
|
LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP2 CONVERTED 25
|
19
|
+
SUBSETTING 2 WIDTH 160
|
19
20
|
# LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP2 RAW 20 # RAW is not allowed for LIMITSBAR widgets
|
20
21
|
LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP2 FORMATTED
|
21
22
|
LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP2 WITH_UNITS
|
@@ -3,7 +3,7 @@ SCREEN AUTO AUTO 1.0
|
|
3
3
|
VERTICAL
|
4
4
|
TITLE Params
|
5
5
|
|
6
|
-
HORIZONTAL
|
6
|
+
HORIZONTAL 20
|
7
7
|
MATRIXBYCOLUMNS 3
|
8
8
|
LABEL VALUE5
|
9
9
|
SETTING WIDTH 100 # Only need width on the first row
|
@@ -60,10 +60,17 @@ VERTICAL
|
|
60
60
|
SETTING LED_COLOR GOOD GREEN
|
61
61
|
SETTING LED_COLOR BAD RED
|
62
62
|
END
|
63
|
-
|
63
|
+
VERTICAL
|
64
|
+
LABELVALUE <%= target_name %> PARAMS P_2.2,2
|
65
|
+
LABELVALUE <%= target_name %> PARAMS P-3+3=3
|
66
|
+
LABELVALUE <%= target_name %> PARAMS P4!@#$%^&*?
|
67
|
+
LABELVALUE <%= target_name %> PARAMS P</5|\>
|
68
|
+
LABELVALUE <%= target_name %> PARAMS P(:6;)
|
69
|
+
END
|
64
70
|
END
|
65
71
|
|
66
|
-
|
67
|
-
|
72
|
+
HORIZONTAL
|
73
|
+
LABEL "Packet Time"
|
74
|
+
VALUE <%= target_name %> PARAMS PACKET_TIMEFORMATTED WITH_UNITS 25
|
68
75
|
END
|
69
76
|
END
|
@@ -11,7 +11,7 @@ HORIZONTAL
|
|
11
11
|
SETTING SCREEN <%= target_name %> LIMITS
|
12
12
|
SETTING TLM <%= target_name %> HEALTH_STATUS TEMP1
|
13
13
|
ROLLUP equipment "Processor" "CPU"
|
14
|
-
|
14
|
+
# No SCREEN should display without pointer cursor
|
15
15
|
SETTING TLM <%= target_name %> HEALTH_STATUS TEMP4
|
16
16
|
ROLLUP satellite-transmit "Satellite" "all temps"
|
17
17
|
SETTING SCREEN <%= target_name %> HS
|