cosmos 3.3.3 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitattributes +2 -0
- data/.travis.yml +2 -1
- data/Gemfile +4 -3
- data/Manifest.txt +22 -0
- data/autohotkey/tools/handbook_creator.ahk +9 -0
- data/autohotkey/tools/packet_viewer.ahk +4 -0
- data/bin/exchndl20-x64.dll +0 -0
- data/bin/exchndl20.dll +0 -0
- data/bin/exchndl21-x64.dll +0 -0
- data/bin/exchndl21.dll +0 -0
- data/bin/exchndl22-x64.dll +0 -0
- data/bin/exchndl22.dll +0 -0
- data/bin/mgwhelp-x64.dll +0 -0
- data/bin/mgwhelp.dll +0 -0
- data/cosmos.gemspec +1 -0
- data/data/crc.txt +30 -24
- data/demo/config/data/crc.txt +3 -3
- data/demo/config/tools/handbook_creator/templates/command_packets.html.erb +3 -1
- data/demo/config/tools/handbook_creator/templates/telemetry_packets.html.erb +3 -1
- data/demo/procedures/cosmos_api_test.rb +1 -1
- data/ext/cosmos/ext/low_fragmentation_array/low_fragmentation_array.c +4 -0
- data/ext/cosmos/ext/platform/platform.c +22 -2
- data/ext/cosmos/ext/structure/structure.c +631 -104
- data/ext/cosmos/ext/telemetry/telemetry.c +3 -2
- data/lib/cosmos/gui/line_graph/line_graph_drawing.rb +71 -92
- data/lib/cosmos/gui/line_graph/overview_graph.rb +1 -1
- data/lib/cosmos/gui/qt.rb +38 -24
- data/lib/cosmos/gui/text/ruby_editor.rb +1 -1
- data/lib/cosmos/packets/binary_accessor.rb +1 -288
- data/lib/cosmos/packets/telemetry.rb +2 -1
- data/lib/cosmos/script/cmd_tlm_server.rb +110 -0
- data/lib/cosmos/script/commands.rb +166 -0
- data/lib/cosmos/script/extract.rb +2 -2
- data/lib/cosmos/script/limits.rb +108 -0
- data/lib/cosmos/script/script.rb +28 -1487
- data/lib/cosmos/script/scripting.rb +889 -0
- data/lib/cosmos/script/telemetry.rb +174 -0
- data/lib/cosmos/script/tools.rb +138 -0
- data/lib/cosmos/streams/stream_protocol.rb +9 -6
- data/lib/cosmos/system/target.rb +55 -38
- data/lib/cosmos/tools/cmd_tlm_server/api.rb +6 -3
- data/lib/cosmos/tools/cmd_tlm_server/connections.rb +0 -1
- data/lib/cosmos/tools/cmd_tlm_server/gui/interfaces_tab.rb +17 -7
- data/lib/cosmos/tools/cmd_tlm_server/interface_thread.rb +15 -4
- data/lib/cosmos/tools/handbook_creator/handbook_creator.rb +15 -8
- data/lib/cosmos/tools/handbook_creator/handbook_creator_config.rb +41 -13
- data/lib/cosmos/tools/packet_viewer/packet_viewer.rb +18 -1
- data/lib/cosmos/tools/tlm_viewer/widgets/canvasline_widget.rb +1 -1
- data/lib/cosmos/tools/tlm_viewer/widgets/canvaslinevalue_widget.rb +1 -1
- data/lib/cosmos/tools/tlm_viewer/widgets/limitsbar_widget.rb +1 -1
- data/lib/cosmos/tools/tlm_viewer/widgets/rangebar_widget.rb +1 -1
- data/lib/cosmos/top_level.rb +1 -1
- data/lib/cosmos/utilities/ruby_lex_utils.rb +1 -1
- data/lib/cosmos/version.rb +5 -5
- data/spec/gui/line_graph/line_clip_spec.rb +6 -6
- data/spec/gui/qt_spec.rb +102 -0
- data/spec/interfaces/interface_spec.rb +9 -9
- data/spec/interfaces/linc_interface_spec.rb +72 -15
- data/spec/interfaces/serial_interface_spec.rb +9 -9
- data/spec/interfaces/simulated_target_interface_spec.rb +7 -7
- data/spec/interfaces/stream_interface_spec.rb +4 -4
- data/spec/interfaces/tcpip_client_interface_spec.rb +8 -8
- data/spec/interfaces/tcpip_server_interface_spec.rb +9 -9
- data/spec/interfaces/udp_interface_spec.rb +20 -20
- data/spec/io/json_drb_spec.rb +4 -4
- data/spec/io/raw_logger_pair_spec.rb +20 -20
- data/spec/io/raw_logger_spec.rb +3 -3
- data/spec/io/tcpip_server_spec.rb +9 -9
- data/spec/io/udp_sockets_spec.rb +2 -2
- data/spec/io/win32_serial_driver_spec.rb +2 -2
- data/spec/packets/binary_accessor_spec.rb +143 -6
- data/spec/packets/commands_spec.rb +5 -5
- data/spec/packets/limits_spec.rb +15 -15
- data/spec/packets/packet_config_spec.rb +19 -19
- data/spec/packets/packet_item_limits_spec.rb +3 -3
- data/spec/packets/packet_item_spec.rb +4 -4
- data/spec/packets/packet_spec.rb +33 -33
- data/spec/packets/structure_item_spec.rb +19 -19
- data/spec/packets/telemetry_spec.rb +6 -6
- data/spec/script/cmd_tlm_server_spec.rb +110 -0
- data/spec/script/commands_disconnect_spec.rb +270 -0
- data/spec/script/commands_spec.rb +288 -0
- data/spec/script/limits_spec.rb +153 -0
- data/spec/script/script_spec.rb +32 -696
- data/spec/script/scripting_spec.rb +436 -0
- data/spec/script/telemetry_spec.rb +130 -0
- data/spec/script/tools_spec.rb +117 -0
- data/spec/spec_helper.rb +10 -5
- data/spec/streams/preidentified_stream_protocol_spec.rb +4 -4
- data/spec/streams/serial_stream_spec.rb +8 -8
- data/spec/streams/stream_protocol_spec.rb +4 -4
- data/spec/streams/tcpip_client_stream_spec.rb +3 -3
- data/spec/streams/tcpip_socket_stream_spec.rb +7 -7
- data/spec/streams/template_stream_protocol_spec.rb +1 -1
- data/spec/system/system_spec.rb +6 -6
- data/spec/system/target_spec.rb +2 -0
- data/spec/tools/cmd_tlm_server/api_spec.rb +17 -17
- data/spec/tools/cmd_tlm_server/cmd_tlm_server_config_spec.rb +5 -5
- data/spec/tools/cmd_tlm_server/interface_thread_spec.rb +3 -3
- data/spec/top_level/top_level_spec.rb +8 -8
- data/spec/utilities/csv_spec.rb +3 -3
- data/spec/utilities/message_log_spec.rb +3 -3
- data/spec/utilities/ruby_lex_utils_spec.rb +7 -7
- data/test/performance/config/tools/launcher/launcher_threads.txt +8 -1
- data/test/performance/tools/CmdTlmServerMemProf +1 -1
- data/test/performance/tools/TlmGrapherMemProf +19 -0
- data/test/performance/tools/TlmGrapherMemProf.bat +59 -0
- metadata +38 -2
|
@@ -420,9 +420,12 @@ module Cosmos
|
|
|
420
420
|
# their target and packet names.
|
|
421
421
|
#
|
|
422
422
|
# @param (see Cosmos::Telemetry#values_and_limits_states)
|
|
423
|
-
# @return [Array<
|
|
424
|
-
#
|
|
425
|
-
#
|
|
423
|
+
# @return [Array< Array<Object>, Array<Symbol>, Array<Array<Numeric>>, String>]
|
|
424
|
+
# Array consisting of an Array of item values, an Array of item limits state
|
|
425
|
+
# given as symbols such as :RED, :YELLOW, :STALE, an Array of Arrays including
|
|
426
|
+
# the limits setting such as red low, yellow low, yellow high, red high and
|
|
427
|
+
# optionally green low and high, and the overall limits state which is
|
|
428
|
+
# one of {Cosmos::Limits::LIMITS_STATES}.
|
|
426
429
|
def get_tlm_values(item_array, value_types = :CONVERTED)
|
|
427
430
|
if !item_array.is_a?(Array) || (!item_array[0].is_a?(Array) and !item_array.empty?)
|
|
428
431
|
raise ArgumentError, "item_array must be nested array: [['TGT','PKT','ITEM'],...]"
|
|
@@ -81,7 +81,6 @@ module Cosmos
|
|
|
81
81
|
connection = @connections[connection_name.upcase]
|
|
82
82
|
raise "Unknown #{@keyword}: #{connection_name}" unless connection
|
|
83
83
|
|
|
84
|
-
connection.disconnect
|
|
85
84
|
stop_thread(connection)
|
|
86
85
|
Logger.info "Disconnected from #{@keyword} #{connection_name.upcase}"
|
|
87
86
|
end
|
|
@@ -50,7 +50,7 @@ module Cosmos
|
|
|
50
50
|
interfaces.all.each do |interface_name, interface|
|
|
51
51
|
button = @interfaces_table[name].cellWidget(row,1)
|
|
52
52
|
state = @interfaces_table[name].item(row,2)
|
|
53
|
-
if interface.connected?
|
|
53
|
+
if interface.connected? and interface.thread
|
|
54
54
|
button.setText('Disconnect')
|
|
55
55
|
button.setDisabled(true) if interface.disable_disconnect
|
|
56
56
|
state.setText('true')
|
|
@@ -58,7 +58,12 @@ module Cosmos
|
|
|
58
58
|
elsif interface.thread
|
|
59
59
|
button.text = 'Cancel Connect'
|
|
60
60
|
button.setDisabled(false)
|
|
61
|
-
state.
|
|
61
|
+
state.setText('attempting')
|
|
62
|
+
state.textColor = Cosmos::RED
|
|
63
|
+
elsif interface.connected?
|
|
64
|
+
button.setText('Error')
|
|
65
|
+
button.setDisabled(false)
|
|
66
|
+
state.setText('error')
|
|
62
67
|
state.textColor = Cosmos::RED
|
|
63
68
|
else
|
|
64
69
|
button.setText('Connect')
|
|
@@ -137,12 +142,14 @@ module Cosmos
|
|
|
137
142
|
end
|
|
138
143
|
|
|
139
144
|
def create_button(name, interface, interface_name)
|
|
140
|
-
if interface.connected?
|
|
145
|
+
if interface.connected? and interface.thread
|
|
141
146
|
button_text = 'Disconnect'
|
|
142
|
-
elsif interface.thread
|
|
143
|
-
button_text = 'Connect'
|
|
144
|
-
else
|
|
147
|
+
elsif interface.thread
|
|
145
148
|
button_text = 'Cancel Connect'
|
|
149
|
+
elsif interface.connected?
|
|
150
|
+
button_text = 'Error'
|
|
151
|
+
else
|
|
152
|
+
button_text = 'Connect'
|
|
146
153
|
end
|
|
147
154
|
button = Qt::PushButton.new(button_text)
|
|
148
155
|
if name == ROUTERS
|
|
@@ -172,12 +179,15 @@ module Cosmos
|
|
|
172
179
|
|
|
173
180
|
def create_state(interface)
|
|
174
181
|
state = Qt::TableWidgetItem.new
|
|
175
|
-
if interface.connected?
|
|
182
|
+
if interface.connected? and interface.thread
|
|
176
183
|
state.setText('true')
|
|
177
184
|
state.textColor = Cosmos::GREEN
|
|
178
185
|
elsif interface.thread
|
|
179
186
|
state.setText('attempting')
|
|
180
187
|
state.textColor = Cosmos::YELLOW
|
|
188
|
+
elsif interface.connected?
|
|
189
|
+
state.setText('error')
|
|
190
|
+
state.textColor = Cosmos::RED
|
|
181
191
|
else
|
|
182
192
|
state.setText('false')
|
|
183
193
|
state.textColor = Cosmos::BLACK
|
|
@@ -46,6 +46,7 @@ module Cosmos
|
|
|
46
46
|
@thread_sleeper = Sleeper.new
|
|
47
47
|
@connection_failed_messages = []
|
|
48
48
|
@connection_lost_messages = []
|
|
49
|
+
@mutex = Mutex.new
|
|
49
50
|
end
|
|
50
51
|
|
|
51
52
|
# Create and start the Ruby thread that will encapsulate the interface.
|
|
@@ -58,9 +59,14 @@ module Cosmos
|
|
|
58
59
|
begin
|
|
59
60
|
Logger.info "Starting packet reading for #{@interface.name}"
|
|
60
61
|
while true
|
|
62
|
+
break if @cancel_thread
|
|
61
63
|
unless @interface.connected?
|
|
62
64
|
begin
|
|
63
|
-
|
|
65
|
+
@mutex.synchronize do
|
|
66
|
+
# We need to make sure connect is not called after stop() has been called
|
|
67
|
+
connect() unless @cancel_thread
|
|
68
|
+
end
|
|
69
|
+
break if @cancel_thread
|
|
64
70
|
rescue Exception => connect_error
|
|
65
71
|
handle_connection_failed(connect_error)
|
|
66
72
|
if @cancel_thread
|
|
@@ -102,14 +108,19 @@ module Cosmos
|
|
|
102
108
|
Cosmos.handle_fatal_exception(error)
|
|
103
109
|
end
|
|
104
110
|
end
|
|
111
|
+
Logger.info "Stopped packet reading for #{@interface.name}"
|
|
105
112
|
end # Thread.new
|
|
106
113
|
end # def start
|
|
107
114
|
|
|
108
115
|
# Disconnect from the interface and stop the thread
|
|
109
116
|
def stop
|
|
110
|
-
@
|
|
111
|
-
|
|
112
|
-
|
|
117
|
+
@mutex.synchronize do
|
|
118
|
+
# Need to make sure that @cancel_thread is set and the interface disconnected within
|
|
119
|
+
# mutex to ensure that connect() is not called when we want to stop()
|
|
120
|
+
@cancel_thread = true
|
|
121
|
+
@thread_sleeper.cancel
|
|
122
|
+
@interface.disconnect
|
|
123
|
+
end
|
|
113
124
|
Cosmos.kill_thread(self, @thread) if @thread != Thread.current
|
|
114
125
|
end
|
|
115
126
|
|
|
@@ -18,8 +18,8 @@ end
|
|
|
18
18
|
|
|
19
19
|
module Cosmos
|
|
20
20
|
|
|
21
|
-
# Creates command and telemetry handbooks from the COSMOS definitions in
|
|
22
|
-
# HTML and PDF format.
|
|
21
|
+
# Creates command and telemetry handbooks from the COSMOS definitions in
|
|
22
|
+
# both HTML and PDF format.
|
|
23
23
|
class HandbookCreator < QtTool
|
|
24
24
|
|
|
25
25
|
def initialize (options)
|
|
@@ -42,11 +42,18 @@ module Cosmos
|
|
|
42
42
|
|
|
43
43
|
def initialize_actions
|
|
44
44
|
super()
|
|
45
|
+
@hide_ignored_action = Qt::Action.new(tr('&Hide Ignored Items'), self)
|
|
46
|
+
@hide_ignored_keyseq = Qt::KeySequence.new(tr('Ctrl+H'))
|
|
47
|
+
@hide_ignored_action.shortcut = @hide_ignored_keyseq
|
|
48
|
+
@hide_ignored_action.statusTip = tr('Do not include ignored items in command and telemetry handbooks')
|
|
49
|
+
@hide_ignored_action.setCheckable(true)
|
|
50
|
+
@hide_ignored_action.setChecked(false)
|
|
45
51
|
end
|
|
46
52
|
|
|
47
53
|
def initialize_menus
|
|
48
54
|
# File Menu
|
|
49
55
|
@file_menu = menuBar.addMenu(tr('&File'))
|
|
56
|
+
@file_menu.addAction(@hide_ignored_action)
|
|
50
57
|
@file_menu.addAction(@exit_action)
|
|
51
58
|
|
|
52
59
|
# Help Menu
|
|
@@ -54,11 +61,11 @@ module Cosmos
|
|
|
54
61
|
initialize_help_menu()
|
|
55
62
|
end
|
|
56
63
|
|
|
57
|
-
def create_pdfs(both
|
|
64
|
+
def create_pdfs(both, hide_ignored)
|
|
58
65
|
success = false
|
|
59
66
|
ProgressDialog.execute(self, 'PDF Creation Progress', 700, 600, true, false, true, true, false) do |progress_dialog|
|
|
60
67
|
begin
|
|
61
|
-
success = @config.create_pdf(progress_dialog)
|
|
68
|
+
success = @config.create_pdf(hide_ignored, progress_dialog)
|
|
62
69
|
if success
|
|
63
70
|
msg = "\n\n"
|
|
64
71
|
msg << "HTML and " if both
|
|
@@ -88,7 +95,7 @@ module Cosmos
|
|
|
88
95
|
@html_button.setStyleSheet("text-align:left")
|
|
89
96
|
@html_button.connect(SIGNAL('clicked()')) do
|
|
90
97
|
begin
|
|
91
|
-
@config.create_html
|
|
98
|
+
@config.create_html(@hide_ignored_action.isChecked)
|
|
92
99
|
Qt::MessageBox.information(self, 'Done', 'HTML Handbooks created successfully')
|
|
93
100
|
rescue Exception => err
|
|
94
101
|
Cosmos.handle_critical_exception(err)
|
|
@@ -99,7 +106,7 @@ module Cosmos
|
|
|
99
106
|
@pdf_button = Qt::PushButton.new(Cosmos.get_icon('pdf-32.png'), 'Create PDF Handbooks')
|
|
100
107
|
@pdf_button.setStyleSheet("text-align:left")
|
|
101
108
|
@pdf_button.connect(SIGNAL('clicked()')) do
|
|
102
|
-
create_pdfs()
|
|
109
|
+
create_pdfs(false, @hide_ignored_action.isChecked)
|
|
103
110
|
end
|
|
104
111
|
@top_layout.addWidget(@pdf_button)
|
|
105
112
|
|
|
@@ -107,8 +114,8 @@ module Cosmos
|
|
|
107
114
|
@html_pdf_button.setStyleSheet("text-align:left")
|
|
108
115
|
@html_pdf_button.connect(SIGNAL('clicked()')) do
|
|
109
116
|
begin
|
|
110
|
-
@config.create_html
|
|
111
|
-
create_pdfs(true)
|
|
117
|
+
@config.create_html(@hide_ignored_action.isChecked)
|
|
118
|
+
create_pdfs(true, @hide_ignored_action.isChecked)
|
|
112
119
|
rescue Exception => err
|
|
113
120
|
Cosmos.handle_critical_exception(err)
|
|
114
121
|
end
|
|
@@ -65,7 +65,8 @@ module Cosmos
|
|
|
65
65
|
@sections << section
|
|
66
66
|
end
|
|
67
67
|
|
|
68
|
-
def create_html
|
|
68
|
+
def create_html(hide_ignored)
|
|
69
|
+
@hide_ignored = hide_ignored
|
|
69
70
|
Cosmos.set_working_dir do
|
|
70
71
|
if @type == :TARGETS
|
|
71
72
|
target_names = @target_names
|
|
@@ -77,7 +78,8 @@ module Cosmos
|
|
|
77
78
|
end
|
|
78
79
|
end
|
|
79
80
|
|
|
80
|
-
def create_pdf(progress_dialog = nil)
|
|
81
|
+
def create_pdf(hide_ignored, progress_dialog = nil)
|
|
82
|
+
@hide_ignored = hide_ignored
|
|
81
83
|
if @pdf
|
|
82
84
|
if progress_dialog
|
|
83
85
|
Qt.execute_in_main_thread(true) do
|
|
@@ -169,19 +171,45 @@ module Cosmos
|
|
|
169
171
|
if section.output != :ALL
|
|
170
172
|
next unless section.output == output
|
|
171
173
|
end
|
|
172
|
-
packets =
|
|
173
|
-
|
|
174
|
-
packets = build_packets(System.telemetry, target_names) if section.type == :TLM
|
|
174
|
+
packets = build_packets(section.type, target_names)
|
|
175
|
+
ignored = build_ignored(section.type, target_names)
|
|
175
176
|
if target_pages
|
|
176
|
-
section.create(file, target_names[0] + ' ' + section.title.to_s, packets)
|
|
177
|
+
section.create(file, target_names[0] + ' ' + section.title.to_s, packets, ignored)
|
|
177
178
|
else
|
|
178
|
-
section.create(file, section.title.to_s, packets)
|
|
179
|
+
section.create(file, section.title.to_s, packets, ignored)
|
|
179
180
|
end
|
|
180
181
|
end
|
|
181
182
|
end
|
|
182
183
|
|
|
183
|
-
def
|
|
184
|
+
def build_ignored(type, target_names)
|
|
185
|
+
ignored = {}
|
|
186
|
+
target_names = System.targets.keys if target_names.empty?
|
|
187
|
+
target_names.each do |name|
|
|
188
|
+
if @hide_ignored
|
|
189
|
+
if type == :CMD
|
|
190
|
+
ignored[name] = System.targets[name].ignored_parameters
|
|
191
|
+
elsif type == :TLM
|
|
192
|
+
ignored[name] = System.targets[name].ignored_items
|
|
193
|
+
end
|
|
194
|
+
else
|
|
195
|
+
# If we're not ignoring items the hash contains an empty array
|
|
196
|
+
ignored[name] = []
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
ignored
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
def build_packets(type, target_names)
|
|
184
203
|
packets = []
|
|
204
|
+
case type
|
|
205
|
+
when :CMD
|
|
206
|
+
packet_accessor = System.commands
|
|
207
|
+
when :TLM
|
|
208
|
+
packet_accessor = System.telemetry
|
|
209
|
+
else
|
|
210
|
+
# Return the empty array because there are no packets
|
|
211
|
+
return packets
|
|
212
|
+
end
|
|
185
213
|
if target_names.empty?
|
|
186
214
|
packet_accessor.all.sort.each do |target_name, target_packets|
|
|
187
215
|
target_packets.sort.each do |packet_name, packet|
|
|
@@ -221,7 +249,7 @@ module Cosmos
|
|
|
221
249
|
@type = type
|
|
222
250
|
end
|
|
223
251
|
|
|
224
|
-
def create(file, title, packets = [])
|
|
252
|
+
def create(file, title, packets = [], ignored = {})
|
|
225
253
|
file.puts ERB.new(File.read(@filename)).result(binding)
|
|
226
254
|
end
|
|
227
255
|
|
|
@@ -235,15 +263,15 @@ module Cosmos
|
|
|
235
263
|
process_file(filename)
|
|
236
264
|
end
|
|
237
265
|
|
|
238
|
-
def create_html
|
|
239
|
-
@pages.each {|page| page.create_html}
|
|
266
|
+
def create_html(hide_ignored)
|
|
267
|
+
@pages.each {|page| page.create_html(hide_ignored)}
|
|
240
268
|
end
|
|
241
269
|
|
|
242
|
-
def create_pdf(progress_dialog = nil)
|
|
270
|
+
def create_pdf(hide_ignored, progress_dialog = nil)
|
|
243
271
|
begin
|
|
244
272
|
@pages.each_with_index do |page, index|
|
|
245
273
|
progress_dialog.set_overall_progress(index.to_f / @pages.length.to_f) if progress_dialog
|
|
246
|
-
page.create_pdf(progress_dialog)
|
|
274
|
+
page.create_pdf(hide_ignored, progress_dialog)
|
|
247
275
|
end
|
|
248
276
|
progress_dialog.set_overall_progress(1.0) if progress_dialog
|
|
249
277
|
rescue Exception => err
|
|
@@ -98,6 +98,20 @@ module Cosmos
|
|
|
98
98
|
@colorblind = @color_blind_action.isChecked
|
|
99
99
|
end
|
|
100
100
|
|
|
101
|
+
@hide_ignored_action = Qt::Action.new(tr('&Hide Ignored Items'), self)
|
|
102
|
+
@hide_ignored_keyseq = Qt::KeySequence.new(tr('Ctrl+H'))
|
|
103
|
+
@hide_ignored_action.shortcut = @hide_ignored_keyseq
|
|
104
|
+
@hide_ignored_action.statusTip = tr('Toggle showing and hiding ignored items')
|
|
105
|
+
@hide_ignored_action.setCheckable(true)
|
|
106
|
+
@hide_ignored_action.setChecked(false)
|
|
107
|
+
@hide_ignored_action.connect(SIGNAL('triggered()')) do
|
|
108
|
+
if @hide_ignored_action.isChecked
|
|
109
|
+
@ignored_rows.each {|row| @table.setRowHidden(row, true) }
|
|
110
|
+
else
|
|
111
|
+
@ignored_rows.each {|row| @table.setRowHidden(row, false) }
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
|
|
101
115
|
@formatted_tlm_units_action = Qt::Action.new(tr('Formatted Telemetry With &Units'), self)
|
|
102
116
|
@formatted_tlm_units_keyseq = Qt::KeySequence.new(tr('Ctrl+U'))
|
|
103
117
|
@formatted_tlm_units_action.shortcut = @formatted_tlm_units_keyseq
|
|
@@ -158,6 +172,7 @@ module Cosmos
|
|
|
158
172
|
# View Menu
|
|
159
173
|
view_menu = menuBar.addMenu(tr('&View'))
|
|
160
174
|
view_menu.addAction(@color_blind_action)
|
|
175
|
+
view_menu.addAction(@hide_ignored_action)
|
|
161
176
|
view_menu.addSeparator.setText(tr('Formatting'));
|
|
162
177
|
view_menu.addAction(@formatted_tlm_units_action)
|
|
163
178
|
view_menu.addAction(@formatted_tlm_action)
|
|
@@ -187,7 +202,7 @@ module Cosmos
|
|
|
187
202
|
target_label = Qt::Label.new(tr("&Target:"))
|
|
188
203
|
target_label.setBuddy(@target_select)
|
|
189
204
|
|
|
190
|
-
# Set the
|
|
205
|
+
# Set the command combobox selection
|
|
191
206
|
@packet_select = Qt::ComboBox.new
|
|
192
207
|
@packet_select.setMaxVisibleItems(20)
|
|
193
208
|
@packet_select.connect(SIGNAL('activated(const QString&)')) do
|
|
@@ -327,7 +342,9 @@ module Cosmos
|
|
|
327
342
|
|
|
328
343
|
row = 0
|
|
329
344
|
featured_item = nil
|
|
345
|
+
@ignored_rows = []
|
|
330
346
|
tlm_items.each do |tlm_name, states, description|
|
|
347
|
+
@ignored_rows << row if System.targets[target_name].ignored_items.include?(tlm_name)
|
|
331
348
|
item = Qt::TableWidgetItem.new(tr("#{tlm_name}:"))
|
|
332
349
|
item.setTextAlignment(Qt::AlignRight)
|
|
333
350
|
item.setFlags(Qt::NoItemFlags | Qt::ItemIsSelectable)
|
|
@@ -40,7 +40,7 @@ module Cosmos
|
|
|
40
40
|
painter.drawLine(@x1, @y1, @x2, @y2)
|
|
41
41
|
painter.drawLine(@x1, @y1, @x2, @y2)
|
|
42
42
|
if (@connector == true)
|
|
43
|
-
painter.setBrush(
|
|
43
|
+
painter.setBrush(@color)
|
|
44
44
|
painter.drawEllipse(@point, @width, @width)
|
|
45
45
|
end
|
|
46
46
|
painter.restore
|
|
@@ -159,7 +159,7 @@ module Cosmos
|
|
|
159
159
|
top_triangle.setPoint(0, @line_pos, @y_pad - 1)
|
|
160
160
|
top_triangle.setPoint(1, @line_pos-5, @y_pad - 6)
|
|
161
161
|
top_triangle.setPoint(2, @line_pos+5, @y_pad - 6)
|
|
162
|
-
dc.setBrush(Cosmos
|
|
162
|
+
dc.setBrush(Cosmos::BLACK)
|
|
163
163
|
dc.drawPolygon(top_triangle)
|
|
164
164
|
top_triangle.dispose
|
|
165
165
|
|
|
@@ -42,7 +42,7 @@ module Cosmos
|
|
|
42
42
|
top_triangle.setPoint(0, @line_pos, @y_pad - 1)
|
|
43
43
|
top_triangle.setPoint(1, @line_pos-5, @y_pad - 6)
|
|
44
44
|
top_triangle.setPoint(2, @line_pos+5, @y_pad - 6)
|
|
45
|
-
dc.setBrush(Cosmos
|
|
45
|
+
dc.setBrush(Cosmos::BLACK)
|
|
46
46
|
dc.drawPolygon(top_triangle)
|
|
47
47
|
|
|
48
48
|
# Draw overall border
|
data/lib/cosmos/top_level.rb
CHANGED
|
@@ -27,7 +27,7 @@ class HazardousError < StandardError
|
|
|
27
27
|
attr_accessor :hazardous_description
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
# The
|
|
30
|
+
# The Ball Aerospace COSMOS system is almost
|
|
31
31
|
# wholly contained within the Cosmos module. COSMOS also extends some of the
|
|
32
32
|
# core Ruby classes to add additional functionality as well as creates
|
|
33
33
|
# additional QT GUI classes under the {Qt} module.
|
data/lib/cosmos/version.rb
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# encoding: ascii-8bit
|
|
2
2
|
|
|
3
|
-
COSMOS_VERSION = '3.
|
|
3
|
+
COSMOS_VERSION = '3.4.0'
|
|
4
4
|
module Cosmos
|
|
5
5
|
module Version
|
|
6
6
|
MAJOR = '3'
|
|
7
|
-
MINOR = '
|
|
8
|
-
PATCH = '
|
|
9
|
-
BUILD = '
|
|
7
|
+
MINOR = '4'
|
|
8
|
+
PATCH = '0'
|
|
9
|
+
BUILD = '9a5a2f777b1122ed55b49caf2febf113a223eeaa'
|
|
10
10
|
end
|
|
11
|
-
VERSION = '3.
|
|
11
|
+
VERSION = '3.4.0'
|
|
12
12
|
end
|
|
@@ -39,11 +39,11 @@ module Cosmos
|
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
it "indicates the first point was not clipped" do
|
|
42
|
-
expect(@clipped_line[4]).to
|
|
42
|
+
expect(@clipped_line[4]).to be false
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
it "indicates the second point was not clipped" do
|
|
46
|
-
expect(@clipped_line[5]).to
|
|
46
|
+
expect(@clipped_line[5]).to be false
|
|
47
47
|
end
|
|
48
48
|
end
|
|
49
49
|
|
|
@@ -59,11 +59,11 @@ module Cosmos
|
|
|
59
59
|
end
|
|
60
60
|
|
|
61
61
|
it "indicates the first point was clipped" do
|
|
62
|
-
expect(@clipped_line[4]).to
|
|
62
|
+
expect(@clipped_line[4]).to be true
|
|
63
63
|
end
|
|
64
64
|
|
|
65
65
|
it "indicates the second point was not clipped" do
|
|
66
|
-
expect(@clipped_line[5]).to
|
|
66
|
+
expect(@clipped_line[5]).to be false
|
|
67
67
|
end
|
|
68
68
|
end
|
|
69
69
|
|
|
@@ -79,11 +79,11 @@ module Cosmos
|
|
|
79
79
|
end
|
|
80
80
|
|
|
81
81
|
it "indicates the first point was not clipped" do
|
|
82
|
-
expect(@clipped_line[4]).to
|
|
82
|
+
expect(@clipped_line[4]).to be false
|
|
83
83
|
end
|
|
84
84
|
|
|
85
85
|
it "indicates the second point was clipped" do
|
|
86
|
-
expect(@clipped_line[5]).to
|
|
86
|
+
expect(@clipped_line[5]).to be true
|
|
87
87
|
end
|
|
88
88
|
end
|
|
89
89
|
|