openc3-cosmos-demo 5.12.0 → 5.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/targets/INST/cmd_tlm/inst_cmds.txt +20 -1
- data/targets/INST/lib/sim_inst.rb +1 -0
- data/targets/INST/screens/adcs.txt +12 -12
- data/targets/INST/screens/array.txt +5 -9
- data/targets/INST/screens/ground.txt +2 -3
- data/targets/INST/screens/hs.txt +8 -12
- data/targets/INST2/cmd_tlm/inst_cmds.txt +17 -0
- data/targets/INST2/cmd_tlm/inst_tlm.txt +1 -0
- data/targets/INST2/lib/sim_inst.py +1 -0
- data/targets/INST2/procedures/my_script_suite.py +3 -4
- data/targets/INST2/procedures/my_test_suite.py +2 -2
- data/targets/INST2/procedures/streaming.py +29 -0
- data/targets/INST2/screens/adcs.txt +12 -12
- data/targets/INST2/screens/array.txt +5 -9
- data/targets/INST2/screens/ground.txt +2 -3
- data/targets/INST2/screens/hs.txt +8 -12
- data/targets/INST2/tables/procedures/{download.rb → download.py} +5 -3
- data/targets/INST2/tables/procedures/{upload.rb → upload.py} +7 -5
- data/targets/SYSTEM/procedures/interactive.rb +2 -2
- data/targets/SYSTEM/procedures/openc3_api_test.rb +6 -6
- data/tools/widgets/BigWidget/BigWidget.umd.min.js +1 -1
- data/tools/widgets/BigWidget/BigWidget.umd.min.js.map +1 -1
- data/tools/widgets/DataviewerquaternionWidget/DataviewerquaternionWidget.umd.min.js +2 -2
- data/tools/widgets/DataviewerquaternionWidget/DataviewerquaternionWidget.umd.min.js.map +1 -1
- data/tools/widgets/DataviewertimeWidget/DataviewertimeWidget.umd.min.js +1 -1
- data/tools/widgets/DataviewertimeWidget/DataviewertimeWidget.umd.min.js.map +1 -1
- data/tools/widgets/HelloworldWidget/HelloworldWidget.umd.min.js +1 -1
- data/tools/widgets/HelloworldWidget/HelloworldWidget.umd.min.js.map +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 253bb085bd444fe9db87ba5f189390c4558bd8cb7dd2bcbe349f8cce236b102a
|
4
|
+
data.tar.gz: b3a09a1463c5b79fe63c4681545bea40cc9c6853c3fab5d4eb84f54eadaed617
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e9608b065308071fee91fd6e0d8b0f1333f1edc7122ffae434f5afa285afe56adf397dc0f2c746583932987df233aa366fdb142075186e6cac522fa3743d009
|
7
|
+
data.tar.gz: 529a869b47ea5fda4c55399bc107be720e2191a110d44fc3c2b69a512a544fde97fa19c411942a67c260946fc314a8a7d0a7147a38196e65834371eca6e9581d
|
@@ -9,6 +9,9 @@ COMMAND <%= target_name %> COLLECT BIG_ENDIAN "Starts a collect on the <%= targe
|
|
9
9
|
FORMAT_STRING "0x%0X"
|
10
10
|
PARAMETER TEMP 120 32 FLOAT 0.0 25.0 0.0 "Collect temperature"
|
11
11
|
UNITS Celsius C
|
12
|
+
RELATED_ITEM <%= target_name %> HEALTH_STATUS COLLECTS
|
13
|
+
RELATED_ITEM <%= target_name %> HEALTH_STATUS DURATION
|
14
|
+
RELATED_ITEM <%= target_name %> HEALTH_STATUS COLLECT_TYPE
|
12
15
|
|
13
16
|
COMMAND <%= target_name %> ABORT BIG_ENDIAN "Aborts a collect on the <%= target_name %> instrument"
|
14
17
|
<%= render "_ccsds_cmd.txt", locals: {id: 2} %>
|
@@ -16,13 +19,17 @@ COMMAND <%= target_name %> ABORT BIG_ENDIAN "Aborts a collect on the <%= target_
|
|
16
19
|
COMMAND <%= target_name %> CLEAR BIG_ENDIAN "Clears counters on the <%= target_name %> instrument"
|
17
20
|
HAZARDOUS "Clearing counters may lose valuable information."
|
18
21
|
<%= render "_ccsds_cmd.txt", locals: {id: 3} %>
|
22
|
+
RELATED_ITEM <%= target_name %> HEALTH_STATUS COLLECTS
|
19
23
|
|
20
24
|
COMMAND <%= target_name %> SETPARAMS BIG_ENDIAN "Sets numbered parameters"
|
21
25
|
<%= render "_ccsds_cmd.txt", locals: {id: 4} %>
|
22
26
|
# ERB syntax:
|
23
27
|
<% (1..5).each do |i| %>
|
24
|
-
|
28
|
+
# The packet is BIG_ENDIAN (CCSDS) but these fields are LITTLE_ENDIAN
|
29
|
+
APPEND_PARAMETER VALUE<%= i %> 16 UINT 0 5 1 "Value <%= i %> setting" LITTLE_ENDIAN
|
30
|
+
RELATED_ITEM <%= target_name %> PARAMS VALUE<%= i %>
|
25
31
|
<% end %>
|
32
|
+
SCREEN <%= target_name %> PARAMS
|
26
33
|
|
27
34
|
SELECT_PARAMETER VALUE5
|
28
35
|
POLY_WRITE_CONVERSION 0 2
|
@@ -35,6 +42,7 @@ COMMAND <%= target_name %> ASCIICMD BIG_ENDIAN "Enumerated ASCII command"
|
|
35
42
|
STATE "NOOP" "NOOP" DISABLE_MESSAGES
|
36
43
|
APPEND_PARAMETER BINARY 32 STRING 0xDEADBEEF "Binary string"
|
37
44
|
APPEND_PARAMETER ASCII 80 STRING "0xDEADBEEF" "ASCII string"
|
45
|
+
RELATED_ITEM <%= target_name %> HEALTH_STATUS ASCIICMD
|
38
46
|
|
39
47
|
COMMAND <%= target_name %> FLTCMD BIG_ENDIAN "Command with float parameters"
|
40
48
|
<%= render "_ccsds_cmd.txt", locals: {id: 6} %>
|
@@ -48,14 +56,25 @@ COMMAND <%= target_name %> ARYCMD BIG_ENDIAN "Command with array parameter"
|
|
48
56
|
|
49
57
|
COMMAND <%= target_name %> SLRPNLDEPLOY BIG_ENDIAN "Deploy solar array panels"
|
50
58
|
<%= render "_ccsds_cmd.txt", locals: {id: 8} %>
|
59
|
+
RELATED_ITEM <%= target_name %> MECH SLRPNL1
|
60
|
+
RELATED_ITEM <%= target_name %> MECH SLRPNL2
|
61
|
+
RELATED_ITEM <%= target_name %> MECH SLRPNL3
|
62
|
+
RELATED_ITEM <%= target_name %> MECH SLRPNL4
|
63
|
+
RELATED_ITEM <%= target_name %> MECH SLRPNL5
|
51
64
|
|
52
65
|
COMMAND <%= target_name %> SLRPNLRESET BIG_ENDIAN "Reset solar array panels"
|
53
66
|
<%= render "_ccsds_cmd.txt", locals: {id: 9} %>
|
67
|
+
RELATED_ITEM <%= target_name %> MECH SLRPNL1
|
68
|
+
RELATED_ITEM <%= target_name %> MECH SLRPNL2
|
69
|
+
RELATED_ITEM <%= target_name %> MECH SLRPNL3
|
70
|
+
RELATED_ITEM <%= target_name %> MECH SLRPNL4
|
71
|
+
RELATED_ITEM <%= target_name %> MECH SLRPNL5
|
54
72
|
|
55
73
|
COMMAND <%= target_name %> MEMLOAD BIG_ENDIAN "Load memory"
|
56
74
|
DISABLE_MESSAGES # Disable messages on a command that could be sent many many times
|
57
75
|
<%= render "_ccsds_cmd.txt", locals: {id: 10} %>
|
58
76
|
APPEND_PARAMETER DATA 80 BLOCK "" "Block of data"
|
77
|
+
RELATED_ITEM <%= target_name %> HEALTH_STATUS BLOCKTEST
|
59
78
|
|
60
79
|
COMMAND <%= target_name %> QUIET BIG_ENDIAN "Enable/disable no out of limits in the demo"
|
61
80
|
<%= render "_ccsds_cmd.txt", locals: {id: 11} %>
|
@@ -178,6 +178,7 @@ module OpenC3
|
|
178
178
|
when 'TIME_OFFSET'
|
179
179
|
@time_offset = packet.read('seconds')
|
180
180
|
when 'SETPARAMS'
|
181
|
+
# puts "SETPARAMS packet: #{packet.buffer.formatted}"
|
181
182
|
params_packet.value1 = packet.read('value1')
|
182
183
|
params_packet.value2 = packet.read('value2')
|
183
184
|
params_packet.value3 = packet.read('value3')
|
@@ -7,27 +7,29 @@ VERTICAL
|
|
7
7
|
HORIZONTAL
|
8
8
|
VERTICALBOX "Position and Velocity"
|
9
9
|
LABELVALUE <%= target_name %> ADCS POSX WITH_UNITS 20 CENTER
|
10
|
+
# We recommend using these built-in colors from 1-8
|
11
|
+
SETTING TEXTCOLOR var(--color-data-visualization-1)
|
10
12
|
LABELVALUE <%= target_name %> ADCS POSY WITH_UNITS 22 CENTER
|
13
|
+
SETTING TEXTCOLOR var(--color-data-visualization-1)
|
11
14
|
LABELVALUE <%= target_name %> ADCS POSZ WITH_UNITS 24 CENTER
|
15
|
+
SETTING TEXTCOLOR var(--color-data-visualization-1)
|
12
16
|
LABELVALUE <%= target_name %> ADCS VELX WITH_UNITS 20
|
17
|
+
SETTING TEXTCOLOR var(--color-data-visualization-2)
|
13
18
|
LABELVALUE <%= target_name %> ADCS VELY WITH_UNITS 22
|
19
|
+
SETTING TEXTCOLOR var(--color-data-visualization-2)
|
14
20
|
LABELVALUE <%= target_name %> ADCS VELZ WITH_UNITS 24
|
21
|
+
SETTING TEXTCOLOR var(--color-data-visualization-2)
|
15
22
|
END
|
16
23
|
|
17
24
|
VERTICALBOX "Attitude"
|
18
25
|
LABELVALUE <%= target_name %> ADCS Q1 WITH_UNITS 12 RIGHT
|
19
26
|
SETTING TEXTALIGN LEFT
|
20
|
-
SETTING TEXTCOLOR RED
|
21
27
|
LABELVALUE <%= target_name %> ADCS Q2 WITH_UNITS 12 RIGHT
|
22
28
|
SETTING TEXTALIGN LEFT
|
23
|
-
SUBSETTING 0 TEXTCOLOR BLUE
|
24
|
-
SUBSETTING 1 TEXTCOLOR GREEN
|
25
29
|
LABELVALUE <%= target_name %> ADCS Q3 WITH_UNITS 12 RIGHT
|
26
30
|
SETTING TEXTALIGN LEFT
|
27
|
-
SETTING BACKCOLOR PURPLE
|
28
31
|
LABELVALUE <%= target_name %> ADCS Q4 WITH_UNITS 12 RIGHT
|
29
32
|
SETTING TEXTALIGN LEFT
|
30
|
-
SUBSETTING 0 BACKCOLOR ORANGE
|
31
33
|
LABELVALUE <%= target_name %> ADCS BIASX WITH_UNITS 12 RIGHT
|
32
34
|
SETTING TEXTALIGN LEFT
|
33
35
|
LABELVALUE <%= target_name %> ADCS BIASY WITH_UNITS 12 RIGHT
|
@@ -37,25 +39,23 @@ VERTICAL
|
|
37
39
|
END
|
38
40
|
|
39
41
|
VERTICALBOX "File Progress"
|
40
|
-
LABELPROGRESSBAR <%= target_name %> ADCS POSPROGRESS
|
42
|
+
LABELPROGRESSBAR <%= target_name %> ADCS POSPROGRESS 1 200 # scale 1, width 200
|
41
43
|
LABELPROGRESSBAR <%= target_name %> ADCS ATTPROGRESS
|
42
|
-
LABELPROGRESSBAR <%= target_name %> ADCS ATTPROGRESS 2
|
44
|
+
LABELPROGRESSBAR <%= target_name %> ADCS ATTPROGRESS 2 # scale by 2
|
43
45
|
|
44
46
|
LABEL ""
|
45
47
|
LABEL "LEFT"
|
46
48
|
SETTING PADDING 5
|
47
49
|
SETTING TEXTALIGN LEFT
|
48
|
-
SETTING BACKCOLOR
|
50
|
+
SETTING BACKCOLOR var(--color-data-visualization-1)
|
49
51
|
LABEL "CENTER"
|
50
52
|
SETTING PADDING 5
|
51
53
|
SETTING TEXTALIGN CENTER
|
52
|
-
SETTING
|
53
|
-
SETTING BACKCOLOR WHITE
|
54
|
+
SETTING BACKCOLOR var(--color-data-visualization-2)
|
54
55
|
LABEL "RIGHT"
|
55
56
|
SETTING PADDING 5
|
56
57
|
SETTING TEXTALIGN RIGHT
|
57
|
-
SETTING
|
58
|
-
SETTING BACKCOLOR BLUE
|
58
|
+
SETTING BACKCOLOR var(--color-data-visualization-3)
|
59
59
|
END
|
60
60
|
END
|
61
61
|
|
@@ -1,16 +1,12 @@
|
|
1
1
|
SCREEN AUTO AUTO 1.0
|
2
|
-
GLOBAL_SETTING ARRAY COLORBLIND TRUE
|
3
|
-
GLOBAL_SETTING TEXTBOX COLORBLIND TRUE
|
4
2
|
|
5
3
|
VERTICAL
|
6
4
|
TITLE "<%= target_name %> Instrument Array Data"
|
7
5
|
ARRAY <%= target_name %> HEALTH_STATUS ARY
|
8
|
-
ARRAY <%= target_name %> HEALTH_STATUS ARY 300
|
9
|
-
ARRAY <%= target_name %> HEALTH_STATUS ARY2 300
|
10
|
-
TEXTBOX <%= target_name %> HEALTH_STATUS ARY 200
|
6
|
+
ARRAY <%= target_name %> HEALTH_STATUS ARY 300 65 nil 8 FORMATTED
|
7
|
+
ARRAY <%= target_name %> HEALTH_STATUS ARY2 300 65 nil 5 WITH_UNITS
|
8
|
+
TEXTBOX <%= target_name %> HEALTH_STATUS ARY 200 65
|
11
9
|
TEXTBOX <%= target_name %> HEALTH_STATUS ARY2 300 200
|
12
|
-
ARRAY <%= target_name %> HEALTH_STATUS GROUND1STATUS 300
|
13
|
-
ARRAY <%= target_name %> HEALTH_STATUS GROUND2STATUS 300
|
14
|
-
TEXTBOX <%= target_name %> HEALTH_STATUS GROUND1STATUS 300 50
|
15
|
-
TEXTBOX <%= target_name %> HEALTH_STATUS GROUND2STATUS 300 100
|
10
|
+
ARRAY <%= target_name %> HEALTH_STATUS GROUND1STATUS 300 65 nil 8 FORMATTED
|
11
|
+
ARRAY <%= target_name %> HEALTH_STATUS GROUND2STATUS 300 65 nil 5 WITH_UNITS
|
16
12
|
END
|
@@ -4,8 +4,8 @@ VERTICAL
|
|
4
4
|
TITLE "<%= target_name %> Instrument Ground Station Status"
|
5
5
|
|
6
6
|
CANVAS 650 600
|
7
|
-
#
|
8
|
-
CANVASLINE 0 3 650 3 blue 3
|
7
|
+
# Example of lines and circles
|
8
|
+
# CANVASLINE 0 3 650 3 blue 3
|
9
9
|
# CANVASDOT 10 15 BLUE 5
|
10
10
|
CANVASLABEL 200 30 "Ground Contact Status"
|
11
11
|
|
@@ -17,7 +17,6 @@ VERTICAL
|
|
17
17
|
# SETTING TLM_AND <%= target_name %> HEALTH_STATUS COLLECTS VALUE_EQ 0
|
18
18
|
# SETTING IMAGE true "ground_on.png" 100 200
|
19
19
|
# SETTING IMAGE false "ground_off.png" 100 200
|
20
|
-
CANVASLINE 10 10 640 10 blue 3
|
21
20
|
CANVASIMAGE "satellite.png" 90 130 200 200
|
22
21
|
# If the image is clicked the "<%= target_name %> ADCS" screen will popup
|
23
22
|
SETTING SCREEN <%= target_name %> ADCS
|
data/targets/INST/screens/hs.txt
CHANGED
@@ -1,14 +1,9 @@
|
|
1
1
|
SCREEN AUTO AUTO 0.5
|
2
|
-
|
3
|
-
GLOBAL_SETTING
|
4
|
-
GLOBAL_SETTING LABELVALUE TEXTCOLOR BLACK
|
5
|
-
GLOBAL_SETTING VERTICALBOX TEXTCOLOR BLACK
|
2
|
+
# Apply a setting to all LABELVALUEs
|
3
|
+
# GLOBAL_SETTING LABELVALUE TEXTCOLOR BLACK
|
6
4
|
|
7
5
|
VERTICAL
|
8
|
-
|
9
6
|
TITLE "<%= target_name %> Instrument Health and Status"
|
10
|
-
SETTING BACKCOLOR 162 181 205
|
11
|
-
SETTING TEXTCOLOR black
|
12
7
|
|
13
8
|
VERTICALBOX "General Telemetry"
|
14
9
|
BUTTON 'Start Collect' 'api.cmd("<%= target_name %> COLLECT with TYPE NORMAL, DURATION 5")'
|
@@ -17,10 +12,9 @@ VERTICAL
|
|
17
12
|
LABELVALUE <%= target_name %> HEALTH_STATUS DURATION
|
18
13
|
LABELVALUE <%= target_name %> HEALTH_STATUS ASCIICMD WITH_UNITS 40
|
19
14
|
END
|
20
|
-
SETTING BACKCOLOR 163 185 163
|
21
15
|
|
22
16
|
VERTICALBOX "Temperatures"
|
23
|
-
LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP1 WITH_UNITS
|
17
|
+
LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP1 WITH_UNITS
|
24
18
|
LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP2 CONVERTED 25
|
25
19
|
# LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP2 RAW 20 # RAW is not allowed for LIMITSBAR widgets
|
26
20
|
LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP2 FORMATTED
|
@@ -28,14 +22,16 @@ VERTICAL
|
|
28
22
|
LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP3
|
29
23
|
LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP4
|
30
24
|
END
|
31
|
-
SETTING BACKCOLOR 203 173 158
|
32
25
|
|
33
26
|
VERTICALBOX "Ground Station"
|
34
27
|
LABELVALUE <%= target_name %> HEALTH_STATUS GROUND1STATUS CONVERTED 18
|
35
28
|
LABELVALUE <%= target_name %> HEALTH_STATUS GROUND2STATUS CONVERTED 18
|
36
29
|
END
|
37
|
-
|
30
|
+
# You can apply settings to an entire box
|
31
|
+
SETTING BACKCOLOR var(--color-data-visualization-2)
|
32
|
+
SETTING TEXTCOLOR BLACK
|
38
33
|
|
39
34
|
<%= render "_footer.txt" %>
|
40
35
|
END
|
41
|
-
|
36
|
+
# You can also apply BACKCOLOR to the entire screen
|
37
|
+
# SETTING BACKCOLOR var(--color-data-visualization-1)
|
@@ -9,6 +9,9 @@ COMMAND <%= target_name %> COLLECT BIG_ENDIAN "Starts a collect on the <%= targe
|
|
9
9
|
FORMAT_STRING "0x%0X"
|
10
10
|
PARAMETER TEMP 120 32 FLOAT 0.0 25.0 0.0 "Collect temperature"
|
11
11
|
UNITS Celsius C
|
12
|
+
RELATED_ITEM <%= target_name %> HEALTH_STATUS COLLECTS
|
13
|
+
RELATED_ITEM <%= target_name %> HEALTH_STATUS DURATION
|
14
|
+
RELATED_ITEM <%= target_name %> HEALTH_STATUS COLLECT_TYPE
|
12
15
|
|
13
16
|
COMMAND <%= target_name %> ABORT BIG_ENDIAN "Aborts a collect on the <%= target_name %> instrument"
|
14
17
|
<%= render "_ccsds_cmd.txt", locals: {id: 2} %>
|
@@ -16,12 +19,14 @@ COMMAND <%= target_name %> ABORT BIG_ENDIAN "Aborts a collect on the <%= target_
|
|
16
19
|
COMMAND <%= target_name %> CLEAR BIG_ENDIAN "Clears counters on the <%= target_name %> instrument"
|
17
20
|
HAZARDOUS "Clearing counters may lose valuable information."
|
18
21
|
<%= render "_ccsds_cmd.txt", locals: {id: 3} %>
|
22
|
+
RELATED_ITEM <%= target_name %> HEALTH_STATUS COLLECTS
|
19
23
|
|
20
24
|
COMMAND <%= target_name %> SETPARAMS BIG_ENDIAN "Sets numbered parameters"
|
21
25
|
<%= render "_ccsds_cmd.txt", locals: {id: 4} %>
|
22
26
|
# ERB syntax:
|
23
27
|
<% (1..5).each do |i| %>
|
24
28
|
APPEND_PARAMETER VALUE<%= i %> 16 UINT 0 5 1 "Value <%= i %> setting"
|
29
|
+
RELATED_ITEM <%= target_name %> PARAMS VALUE<%= i %>
|
25
30
|
<% end %>
|
26
31
|
|
27
32
|
SELECT_PARAMETER VALUE5
|
@@ -35,6 +40,7 @@ COMMAND <%= target_name %> ASCIICMD BIG_ENDIAN "Enumerated ASCII command"
|
|
35
40
|
STATE "NOOP" "NOOP" DISABLE_MESSAGES
|
36
41
|
APPEND_PARAMETER BINARY 32 STRING 0xDEADBEEF "Binary string"
|
37
42
|
APPEND_PARAMETER ASCII 80 STRING "0xDEADBEEF" "ASCII string"
|
43
|
+
RELATED_ITEM <%= target_name %> HEALTH_STATUS ASCIICMD
|
38
44
|
|
39
45
|
COMMAND <%= target_name %> FLTCMD BIG_ENDIAN "Command with float parameters"
|
40
46
|
<%= render "_ccsds_cmd.txt", locals: {id: 6} %>
|
@@ -48,14 +54,25 @@ COMMAND <%= target_name %> ARYCMD BIG_ENDIAN "Command with array parameter"
|
|
48
54
|
|
49
55
|
COMMAND <%= target_name %> SLRPNLDEPLOY BIG_ENDIAN "Deploy solar array panels"
|
50
56
|
<%= render "_ccsds_cmd.txt", locals: {id: 8} %>
|
57
|
+
RELATED_ITEM <%= target_name %> MECH SLRPNL1
|
58
|
+
RELATED_ITEM <%= target_name %> MECH SLRPNL2
|
59
|
+
RELATED_ITEM <%= target_name %> MECH SLRPNL3
|
60
|
+
RELATED_ITEM <%= target_name %> MECH SLRPNL4
|
61
|
+
RELATED_ITEM <%= target_name %> MECH SLRPNL5
|
51
62
|
|
52
63
|
COMMAND <%= target_name %> SLRPNLRESET BIG_ENDIAN "Reset solar array panels"
|
53
64
|
<%= render "_ccsds_cmd.txt", locals: {id: 9} %>
|
65
|
+
RELATED_ITEM <%= target_name %> MECH SLRPNL1
|
66
|
+
RELATED_ITEM <%= target_name %> MECH SLRPNL2
|
67
|
+
RELATED_ITEM <%= target_name %> MECH SLRPNL3
|
68
|
+
RELATED_ITEM <%= target_name %> MECH SLRPNL4
|
69
|
+
RELATED_ITEM <%= target_name %> MECH SLRPNL5
|
54
70
|
|
55
71
|
COMMAND <%= target_name %> MEMLOAD BIG_ENDIAN "Load memory"
|
56
72
|
DISABLE_MESSAGES # Disable messages on a command that could be sent many many times
|
57
73
|
<%= render "_ccsds_cmd.txt", locals: {id: 10} %>
|
58
74
|
APPEND_PARAMETER DATA 80 BLOCK "" "Block of data"
|
75
|
+
RELATED_ITEM <%= target_name %> HEALTH_STATUS BLOCKTEST
|
59
76
|
|
60
77
|
COMMAND <%= target_name %> QUIET BIG_ENDIAN "Enable/disable no out of limits in the demo"
|
61
78
|
<%= render "_ccsds_cmd.txt", locals: {id: 11} %>
|
@@ -145,5 +145,6 @@ TELEMETRY <%= target_name %> MECH BIG_ENDIAN "Mechanism status"
|
|
145
145
|
UNITS DEGREES DEG
|
146
146
|
APPEND_ITEM CURRENT 32 FLOAT "Device current"
|
147
147
|
UNITS micro-Ampères µA
|
148
|
+
APPEND_ITEM STRING 0 STRING "String"
|
148
149
|
ITEM PACKET_TIME 0 0 DERIVED "Ruby time based on TIMESEC and TIMEUS"
|
149
150
|
READ_CONVERSION openc3/conversions/unix_time_conversion.py TIMESEC TIMEUS
|
@@ -373,6 +373,7 @@ class SimInst(SimulatedTarget):
|
|
373
373
|
packet.write("slrpnl4", self.solar_panel_positions[3])
|
374
374
|
packet.write("slrpnl5", self.solar_panel_positions[4])
|
375
375
|
packet.write("current", 0.5)
|
376
|
+
packet.write("string", f"Time is {time}")
|
376
377
|
|
377
378
|
# Every 10s throw an unknown packet at the server just to demo that
|
378
379
|
if count_100hz % 1000 == 900:
|
@@ -1,7 +1,6 @@
|
|
1
|
-
from openc3.script.exceptions import *
|
2
1
|
from openc3.script.suite import Group, Suite
|
3
2
|
|
4
|
-
load_utility("
|
3
|
+
load_utility("INST2/procedures/utilities/clear.py")
|
5
4
|
|
6
5
|
|
7
6
|
class ExampleGroup(Group):
|
@@ -12,7 +11,7 @@ class ExampleGroup(Group):
|
|
12
11
|
print(
|
13
12
|
f"Running {Group.current_suite()}:{Group.current_group()}:{Group.current_script()}"
|
14
13
|
)
|
15
|
-
Group.
|
14
|
+
Group.print("This test verifies requirement 1")
|
16
15
|
raise RuntimeError("error")
|
17
16
|
print("continue past raise") # NOSONAR
|
18
17
|
|
@@ -20,7 +19,7 @@ class ExampleGroup(Group):
|
|
20
19
|
print(
|
21
20
|
f"Running {Group.current_suite()}:{Group.current_group()}:{Group.current_script()}"
|
22
21
|
)
|
23
|
-
Group.
|
22
|
+
Group.print("This test verifies requirement 2")
|
24
23
|
self.helper()
|
25
24
|
wait(2)
|
26
25
|
|
@@ -9,7 +9,7 @@ class ExampleTest(Test):
|
|
9
9
|
print(
|
10
10
|
f"Running {Test.current_test_suite()}:{Test.current_test()}:{Test.current_test_case()}"
|
11
11
|
)
|
12
|
-
Test.
|
12
|
+
Test.print("This test verifies requirement 1")
|
13
13
|
raise RuntimeError("error")
|
14
14
|
print("continue past raise") # NOSONAR
|
15
15
|
|
@@ -17,7 +17,7 @@ class ExampleTest(Test):
|
|
17
17
|
print(
|
18
18
|
f"Running {Test.current_test_suite()}:{Test.current_test()}:{Test.current_test_case()}"
|
19
19
|
)
|
20
|
-
Test.
|
20
|
+
Test.print("This test verifies requirement 2")
|
21
21
|
self.helper()
|
22
22
|
wait(2)
|
23
23
|
|
@@ -0,0 +1,29 @@
|
|
1
|
+
from datetime import datetime, timezone, timedelta
|
2
|
+
from openc3.script.web_socket_api import StreamingWebSocketApi
|
3
|
+
|
4
|
+
|
5
|
+
with StreamingWebSocketApi() as api:
|
6
|
+
api.add(
|
7
|
+
# Get a list of individual telemetry items
|
8
|
+
items=[
|
9
|
+
"DECOM__TLM__INST__HEALTH_STATUS__TEMP1__CONVERTED",
|
10
|
+
"DECOM__TLM__INST__HEALTH_STATUS__TEMP2__CONVERTED",
|
11
|
+
]
|
12
|
+
)
|
13
|
+
for _ in range(5):
|
14
|
+
print(api.read())
|
15
|
+
api.remove(items=["DECOM__TLM__INST__HEALTH_STATUS__TEMP1__CONVERTED"])
|
16
|
+
for _ in range(5):
|
17
|
+
print(api.read())
|
18
|
+
|
19
|
+
# Warning this saves all data to RAM. Do not use for large queries
|
20
|
+
now = datetime.now(timezone.utc)
|
21
|
+
data = StreamingWebSocketApi.read_all(
|
22
|
+
items=[
|
23
|
+
"DECOM__TLM__INST__HEALTH_STATUS__TEMP1__CONVERTED",
|
24
|
+
"DECOM__TLM__INST__HEALTH_STATUS__TEMP2__CONVERTED",
|
25
|
+
],
|
26
|
+
start_time=now - timedelta(seconds=30),
|
27
|
+
end_time=now + timedelta(seconds=5),
|
28
|
+
)
|
29
|
+
print(data)
|
@@ -7,27 +7,29 @@ VERTICAL
|
|
7
7
|
HORIZONTAL
|
8
8
|
VERTICALBOX "Position and Velocity"
|
9
9
|
LABELVALUE <%= target_name %> ADCS POSX WITH_UNITS 20 CENTER
|
10
|
+
# We recommend using these built-in colors from 1-8
|
11
|
+
SETTING TEXTCOLOR var(--color-data-visualization-1)
|
10
12
|
LABELVALUE <%= target_name %> ADCS POSY WITH_UNITS 22 CENTER
|
13
|
+
SETTING TEXTCOLOR var(--color-data-visualization-1)
|
11
14
|
LABELVALUE <%= target_name %> ADCS POSZ WITH_UNITS 24 CENTER
|
15
|
+
SETTING TEXTCOLOR var(--color-data-visualization-1)
|
12
16
|
LABELVALUE <%= target_name %> ADCS VELX WITH_UNITS 20
|
17
|
+
SETTING TEXTCOLOR var(--color-data-visualization-2)
|
13
18
|
LABELVALUE <%= target_name %> ADCS VELY WITH_UNITS 22
|
19
|
+
SETTING TEXTCOLOR var(--color-data-visualization-2)
|
14
20
|
LABELVALUE <%= target_name %> ADCS VELZ WITH_UNITS 24
|
21
|
+
SETTING TEXTCOLOR var(--color-data-visualization-2)
|
15
22
|
END
|
16
23
|
|
17
24
|
VERTICALBOX "Attitude"
|
18
25
|
LABELVALUE <%= target_name %> ADCS Q1 WITH_UNITS 12 RIGHT
|
19
26
|
SETTING TEXTALIGN LEFT
|
20
|
-
SETTING TEXTCOLOR RED
|
21
27
|
LABELVALUE <%= target_name %> ADCS Q2 WITH_UNITS 12 RIGHT
|
22
28
|
SETTING TEXTALIGN LEFT
|
23
|
-
SUBSETTING 0 TEXTCOLOR BLUE
|
24
|
-
SUBSETTING 1 TEXTCOLOR GREEN
|
25
29
|
LABELVALUE <%= target_name %> ADCS Q3 WITH_UNITS 12 RIGHT
|
26
30
|
SETTING TEXTALIGN LEFT
|
27
|
-
SETTING BACKCOLOR PURPLE
|
28
31
|
LABELVALUE <%= target_name %> ADCS Q4 WITH_UNITS 12 RIGHT
|
29
32
|
SETTING TEXTALIGN LEFT
|
30
|
-
SUBSETTING 0 BACKCOLOR ORANGE
|
31
33
|
LABELVALUE <%= target_name %> ADCS BIASX WITH_UNITS 12 RIGHT
|
32
34
|
SETTING TEXTALIGN LEFT
|
33
35
|
LABELVALUE <%= target_name %> ADCS BIASY WITH_UNITS 12 RIGHT
|
@@ -37,25 +39,23 @@ VERTICAL
|
|
37
39
|
END
|
38
40
|
|
39
41
|
VERTICALBOX "File Progress"
|
40
|
-
LABELPROGRESSBAR <%= target_name %> ADCS POSPROGRESS
|
42
|
+
LABELPROGRESSBAR <%= target_name %> ADCS POSPROGRESS 1 200 # scale 1, width 200
|
41
43
|
LABELPROGRESSBAR <%= target_name %> ADCS ATTPROGRESS
|
42
|
-
LABELPROGRESSBAR <%= target_name %> ADCS ATTPROGRESS 2
|
44
|
+
LABELPROGRESSBAR <%= target_name %> ADCS ATTPROGRESS 2 # scale by 2
|
43
45
|
|
44
46
|
LABEL ""
|
45
47
|
LABEL "LEFT"
|
46
48
|
SETTING PADDING 5
|
47
49
|
SETTING TEXTALIGN LEFT
|
48
|
-
SETTING BACKCOLOR
|
50
|
+
SETTING BACKCOLOR var(--color-data-visualization-1)
|
49
51
|
LABEL "CENTER"
|
50
52
|
SETTING PADDING 5
|
51
53
|
SETTING TEXTALIGN CENTER
|
52
|
-
SETTING
|
53
|
-
SETTING BACKCOLOR WHITE
|
54
|
+
SETTING BACKCOLOR var(--color-data-visualization-2)
|
54
55
|
LABEL "RIGHT"
|
55
56
|
SETTING PADDING 5
|
56
57
|
SETTING TEXTALIGN RIGHT
|
57
|
-
SETTING
|
58
|
-
SETTING BACKCOLOR BLUE
|
58
|
+
SETTING BACKCOLOR var(--color-data-visualization-3)
|
59
59
|
END
|
60
60
|
END
|
61
61
|
|
@@ -1,16 +1,12 @@
|
|
1
1
|
SCREEN AUTO AUTO 1.0
|
2
|
-
GLOBAL_SETTING ARRAY COLORBLIND TRUE
|
3
|
-
GLOBAL_SETTING TEXTBOX COLORBLIND TRUE
|
4
2
|
|
5
3
|
VERTICAL
|
6
4
|
TITLE "<%= target_name %> Instrument Array Data"
|
7
5
|
ARRAY <%= target_name %> HEALTH_STATUS ARY
|
8
|
-
ARRAY <%= target_name %> HEALTH_STATUS ARY 300
|
9
|
-
ARRAY <%= target_name %> HEALTH_STATUS ARY2 300
|
10
|
-
TEXTBOX <%= target_name %> HEALTH_STATUS ARY 200
|
6
|
+
ARRAY <%= target_name %> HEALTH_STATUS ARY 300 65 nil 8 FORMATTED
|
7
|
+
ARRAY <%= target_name %> HEALTH_STATUS ARY2 300 65 nil 5 WITH_UNITS
|
8
|
+
TEXTBOX <%= target_name %> HEALTH_STATUS ARY 200 65
|
11
9
|
TEXTBOX <%= target_name %> HEALTH_STATUS ARY2 300 200
|
12
|
-
ARRAY <%= target_name %> HEALTH_STATUS GROUND1STATUS 300
|
13
|
-
ARRAY <%= target_name %> HEALTH_STATUS GROUND2STATUS 300
|
14
|
-
TEXTBOX <%= target_name %> HEALTH_STATUS GROUND1STATUS 300 50
|
15
|
-
TEXTBOX <%= target_name %> HEALTH_STATUS GROUND2STATUS 300 100
|
10
|
+
ARRAY <%= target_name %> HEALTH_STATUS GROUND1STATUS 300 65 nil 8 FORMATTED
|
11
|
+
ARRAY <%= target_name %> HEALTH_STATUS GROUND2STATUS 300 65 nil 5 WITH_UNITS
|
16
12
|
END
|
@@ -4,8 +4,8 @@ VERTICAL
|
|
4
4
|
TITLE "<%= target_name %> Instrument Ground Station Status"
|
5
5
|
|
6
6
|
CANVAS 650 600
|
7
|
-
#
|
8
|
-
CANVASLINE 0 3 650 3 blue 3
|
7
|
+
# Example of lines and circles
|
8
|
+
# CANVASLINE 0 3 650 3 blue 3
|
9
9
|
# CANVASDOT 10 15 BLUE 5
|
10
10
|
CANVASLABEL 200 30 "Ground Contact Status"
|
11
11
|
|
@@ -17,7 +17,6 @@ VERTICAL
|
|
17
17
|
# SETTING TLM_AND <%= target_name %> HEALTH_STATUS COLLECTS VALUE_EQ 0
|
18
18
|
# SETTING IMAGE true "ground_on.png" 100 200
|
19
19
|
# SETTING IMAGE false "ground_off.png" 100 200
|
20
|
-
CANVASLINE 10 10 640 10 blue 3
|
21
20
|
CANVASIMAGE "satellite.png" 90 130 200 200
|
22
21
|
# If the image is clicked the "<%= target_name %> ADCS" screen will popup
|
23
22
|
SETTING SCREEN <%= target_name %> ADCS
|
@@ -1,14 +1,9 @@
|
|
1
1
|
SCREEN AUTO AUTO 0.5
|
2
|
-
|
3
|
-
GLOBAL_SETTING
|
4
|
-
GLOBAL_SETTING LABELVALUE TEXTCOLOR BLACK
|
5
|
-
GLOBAL_SETTING VERTICALBOX TEXTCOLOR BLACK
|
2
|
+
# Apply a setting to all LABELVALUEs
|
3
|
+
# GLOBAL_SETTING LABELVALUE TEXTCOLOR BLACK
|
6
4
|
|
7
5
|
VERTICAL
|
8
|
-
|
9
6
|
TITLE "<%= target_name %> Instrument Health and Status"
|
10
|
-
SETTING BACKCOLOR 162 181 205
|
11
|
-
SETTING TEXTCOLOR black
|
12
7
|
|
13
8
|
VERTICALBOX "General Telemetry"
|
14
9
|
BUTTON 'Start Collect' 'api.cmd("<%= target_name %> COLLECT with TYPE NORMAL, DURATION 5")'
|
@@ -17,10 +12,9 @@ VERTICAL
|
|
17
12
|
LABELVALUE <%= target_name %> HEALTH_STATUS DURATION
|
18
13
|
LABELVALUE <%= target_name %> HEALTH_STATUS ASCIICMD WITH_UNITS 40
|
19
14
|
END
|
20
|
-
SETTING BACKCOLOR 163 185 163
|
21
15
|
|
22
16
|
VERTICALBOX "Temperatures"
|
23
|
-
LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP1 WITH_UNITS
|
17
|
+
LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP1 WITH_UNITS
|
24
18
|
LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP2 CONVERTED 25
|
25
19
|
# LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP2 RAW 20 # RAW is not allowed for LIMITSBAR widgets
|
26
20
|
LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP2 FORMATTED
|
@@ -28,14 +22,16 @@ VERTICAL
|
|
28
22
|
LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP3
|
29
23
|
LABELVALUELIMITSBAR <%= target_name %> HEALTH_STATUS TEMP4
|
30
24
|
END
|
31
|
-
SETTING BACKCOLOR 203 173 158
|
32
25
|
|
33
26
|
VERTICALBOX "Ground Station"
|
34
27
|
LABELVALUE <%= target_name %> HEALTH_STATUS GROUND1STATUS CONVERTED 18
|
35
28
|
LABELVALUE <%= target_name %> HEALTH_STATUS GROUND2STATUS CONVERTED 18
|
36
29
|
END
|
37
|
-
|
30
|
+
# You can apply settings to an entire box
|
31
|
+
SETTING BACKCOLOR var(--color-data-visualization-2)
|
32
|
+
SETTING TEXTCOLOR BLACK
|
38
33
|
|
39
34
|
<%= render "_footer.txt" %>
|
40
35
|
END
|
41
|
-
|
36
|
+
# You can also apply BACKCOLOR to the entire screen
|
37
|
+
# SETTING BACKCOLOR var(--color-data-visualization-1)
|
@@ -1,9 +1,11 @@
|
|
1
|
+
import os
|
2
|
+
|
1
3
|
# TBL_FILENAME is set to the name of the table file to overwrite
|
2
|
-
|
4
|
+
print(f"file:{os.environ['TBL_FILENAME']}")
|
3
5
|
# Download the file
|
4
6
|
# Implement custom commanding logic to download the table
|
5
7
|
# You probably want to do something like:
|
6
|
-
buffer =
|
8
|
+
buffer = ""
|
7
9
|
# i = 1
|
8
10
|
# num_segments = 5 # calculate based on TBL_FILENAME
|
9
11
|
# table_id = 1 # calculate based on TBL_FILENAME
|
@@ -13,4 +15,4 @@ buffer = ''
|
|
13
15
|
# buffer += tlm("TGT DUMP_PKT DATA")
|
14
16
|
# i += 1
|
15
17
|
# end
|
16
|
-
put_target_file(
|
18
|
+
put_target_file(os.environ["TBL_FILENAME"], buffer)
|
@@ -1,9 +1,11 @@
|
|
1
|
+
import os
|
2
|
+
from openc3.utilities.string import formatted
|
3
|
+
|
1
4
|
# TBL_FILENAME is set to the name of the table file
|
2
|
-
|
5
|
+
print(f"file:{os.environ['TBL_FILENAME']}")
|
3
6
|
# Open the file
|
4
|
-
file = get_target_file(
|
5
|
-
buffer = file.read
|
6
|
-
# puts buffer.formatted
|
7
|
+
file = get_target_file(os.environ["TBL_FILENAME"])
|
8
|
+
buffer = file.read()
|
7
9
|
# Implement custom commanding logic to upload the table
|
8
10
|
# Note that buffer is a Ruby string of bytes
|
9
11
|
# You probably want to do something like:
|
@@ -16,4 +18,4 @@ buffer = file.read
|
|
16
18
|
# cmd("TGT", "UPLOAD", "DATA" => buffer[i...(i + buf_size)])
|
17
19
|
# i += buf_size
|
18
20
|
# end
|
19
|
-
file.
|
21
|
+
file.close()
|
@@ -12,9 +12,9 @@ answer = combo_box("This is a combo box", 'one', 'two', 'three', text_color: 'bl
|
|
12
12
|
puts "answer:#{answer}"
|
13
13
|
answer = combo_box("This is a multi-select combo box", 'one', 'two', 'three', multiple: true)
|
14
14
|
puts "answer:#{answer} len:#{answer.length} [0]:#{answer[0]}"
|
15
|
-
answer = prompt("This is a test", text_color: 'blue', background_color: 'grey', font_size: 20, font_family: 'courier',
|
15
|
+
answer = prompt("This is a test", text_color: 'blue', background_color: 'grey', font_size: 20, font_family: 'courier', details: "Some more stuff")
|
16
16
|
puts "answer:#{answer}"
|
17
|
-
answer = prompt("This is a test", font_size: 30, details: "Some more stuff"
|
17
|
+
answer = prompt("This is a test", font_size: 30, details: "Some more stuff")
|
18
18
|
puts "answer:#{answer}"
|
19
19
|
answer = message_box('This is a message box', 'one', 'two', 'three', text_color: 'blue', background_color: 'grey', font_size: 20, font_family: 'courier', informative: "Informative stuff", details: "Some more stuff")
|
20
20
|
puts "answer:#{answer}"
|
@@ -145,15 +145,15 @@ send_raw("INT1")
|
|
145
145
|
send_raw("INT1", "\x00\x00")
|
146
146
|
send_raw("INT1", "\x00\x00", "\x00\x00")
|
147
147
|
|
148
|
-
#
|
148
|
+
# get_all_cmds
|
149
149
|
expected_cmds = %w(ABORT ARYCMD ASCIICMD CLEAR COLLECT FLTCMD SETPARAMS SLRPNLDEPLOY SLRPNLRESET)
|
150
|
-
commands =
|
150
|
+
commands = get_all_cmds("INST")
|
151
151
|
puts commands.inspect
|
152
152
|
|
153
|
-
#
|
154
|
-
|
155
|
-
|
156
|
-
|
153
|
+
# get_all_cmds should fail
|
154
|
+
get_all_cmds()
|
155
|
+
get_all_cmds("BOB")
|
156
|
+
get_all_cmds("BOB", "TED")
|
157
157
|
|
158
158
|
# get_cmd_hazardous
|
159
159
|
hazardous = get_cmd_hazardous("INST", "COLLECT", "TYPE" => "SPECIAL")
|