cosmos 3.3.3 → 3.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/.gitattributes +2 -0
  3. data/.travis.yml +2 -1
  4. data/Gemfile +4 -3
  5. data/Manifest.txt +22 -0
  6. data/autohotkey/tools/handbook_creator.ahk +9 -0
  7. data/autohotkey/tools/packet_viewer.ahk +4 -0
  8. data/bin/exchndl20-x64.dll +0 -0
  9. data/bin/exchndl20.dll +0 -0
  10. data/bin/exchndl21-x64.dll +0 -0
  11. data/bin/exchndl21.dll +0 -0
  12. data/bin/exchndl22-x64.dll +0 -0
  13. data/bin/exchndl22.dll +0 -0
  14. data/bin/mgwhelp-x64.dll +0 -0
  15. data/bin/mgwhelp.dll +0 -0
  16. data/cosmos.gemspec +1 -0
  17. data/data/crc.txt +30 -24
  18. data/demo/config/data/crc.txt +3 -3
  19. data/demo/config/tools/handbook_creator/templates/command_packets.html.erb +3 -1
  20. data/demo/config/tools/handbook_creator/templates/telemetry_packets.html.erb +3 -1
  21. data/demo/procedures/cosmos_api_test.rb +1 -1
  22. data/ext/cosmos/ext/low_fragmentation_array/low_fragmentation_array.c +4 -0
  23. data/ext/cosmos/ext/platform/platform.c +22 -2
  24. data/ext/cosmos/ext/structure/structure.c +631 -104
  25. data/ext/cosmos/ext/telemetry/telemetry.c +3 -2
  26. data/lib/cosmos/gui/line_graph/line_graph_drawing.rb +71 -92
  27. data/lib/cosmos/gui/line_graph/overview_graph.rb +1 -1
  28. data/lib/cosmos/gui/qt.rb +38 -24
  29. data/lib/cosmos/gui/text/ruby_editor.rb +1 -1
  30. data/lib/cosmos/packets/binary_accessor.rb +1 -288
  31. data/lib/cosmos/packets/telemetry.rb +2 -1
  32. data/lib/cosmos/script/cmd_tlm_server.rb +110 -0
  33. data/lib/cosmos/script/commands.rb +166 -0
  34. data/lib/cosmos/script/extract.rb +2 -2
  35. data/lib/cosmos/script/limits.rb +108 -0
  36. data/lib/cosmos/script/script.rb +28 -1487
  37. data/lib/cosmos/script/scripting.rb +889 -0
  38. data/lib/cosmos/script/telemetry.rb +174 -0
  39. data/lib/cosmos/script/tools.rb +138 -0
  40. data/lib/cosmos/streams/stream_protocol.rb +9 -6
  41. data/lib/cosmos/system/target.rb +55 -38
  42. data/lib/cosmos/tools/cmd_tlm_server/api.rb +6 -3
  43. data/lib/cosmos/tools/cmd_tlm_server/connections.rb +0 -1
  44. data/lib/cosmos/tools/cmd_tlm_server/gui/interfaces_tab.rb +17 -7
  45. data/lib/cosmos/tools/cmd_tlm_server/interface_thread.rb +15 -4
  46. data/lib/cosmos/tools/handbook_creator/handbook_creator.rb +15 -8
  47. data/lib/cosmos/tools/handbook_creator/handbook_creator_config.rb +41 -13
  48. data/lib/cosmos/tools/packet_viewer/packet_viewer.rb +18 -1
  49. data/lib/cosmos/tools/tlm_viewer/widgets/canvasline_widget.rb +1 -1
  50. data/lib/cosmos/tools/tlm_viewer/widgets/canvaslinevalue_widget.rb +1 -1
  51. data/lib/cosmos/tools/tlm_viewer/widgets/limitsbar_widget.rb +1 -1
  52. data/lib/cosmos/tools/tlm_viewer/widgets/rangebar_widget.rb +1 -1
  53. data/lib/cosmos/top_level.rb +1 -1
  54. data/lib/cosmos/utilities/ruby_lex_utils.rb +1 -1
  55. data/lib/cosmos/version.rb +5 -5
  56. data/spec/gui/line_graph/line_clip_spec.rb +6 -6
  57. data/spec/gui/qt_spec.rb +102 -0
  58. data/spec/interfaces/interface_spec.rb +9 -9
  59. data/spec/interfaces/linc_interface_spec.rb +72 -15
  60. data/spec/interfaces/serial_interface_spec.rb +9 -9
  61. data/spec/interfaces/simulated_target_interface_spec.rb +7 -7
  62. data/spec/interfaces/stream_interface_spec.rb +4 -4
  63. data/spec/interfaces/tcpip_client_interface_spec.rb +8 -8
  64. data/spec/interfaces/tcpip_server_interface_spec.rb +9 -9
  65. data/spec/interfaces/udp_interface_spec.rb +20 -20
  66. data/spec/io/json_drb_spec.rb +4 -4
  67. data/spec/io/raw_logger_pair_spec.rb +20 -20
  68. data/spec/io/raw_logger_spec.rb +3 -3
  69. data/spec/io/tcpip_server_spec.rb +9 -9
  70. data/spec/io/udp_sockets_spec.rb +2 -2
  71. data/spec/io/win32_serial_driver_spec.rb +2 -2
  72. data/spec/packets/binary_accessor_spec.rb +143 -6
  73. data/spec/packets/commands_spec.rb +5 -5
  74. data/spec/packets/limits_spec.rb +15 -15
  75. data/spec/packets/packet_config_spec.rb +19 -19
  76. data/spec/packets/packet_item_limits_spec.rb +3 -3
  77. data/spec/packets/packet_item_spec.rb +4 -4
  78. data/spec/packets/packet_spec.rb +33 -33
  79. data/spec/packets/structure_item_spec.rb +19 -19
  80. data/spec/packets/telemetry_spec.rb +6 -6
  81. data/spec/script/cmd_tlm_server_spec.rb +110 -0
  82. data/spec/script/commands_disconnect_spec.rb +270 -0
  83. data/spec/script/commands_spec.rb +288 -0
  84. data/spec/script/limits_spec.rb +153 -0
  85. data/spec/script/script_spec.rb +32 -696
  86. data/spec/script/scripting_spec.rb +436 -0
  87. data/spec/script/telemetry_spec.rb +130 -0
  88. data/spec/script/tools_spec.rb +117 -0
  89. data/spec/spec_helper.rb +10 -5
  90. data/spec/streams/preidentified_stream_protocol_spec.rb +4 -4
  91. data/spec/streams/serial_stream_spec.rb +8 -8
  92. data/spec/streams/stream_protocol_spec.rb +4 -4
  93. data/spec/streams/tcpip_client_stream_spec.rb +3 -3
  94. data/spec/streams/tcpip_socket_stream_spec.rb +7 -7
  95. data/spec/streams/template_stream_protocol_spec.rb +1 -1
  96. data/spec/system/system_spec.rb +6 -6
  97. data/spec/system/target_spec.rb +2 -0
  98. data/spec/tools/cmd_tlm_server/api_spec.rb +17 -17
  99. data/spec/tools/cmd_tlm_server/cmd_tlm_server_config_spec.rb +5 -5
  100. data/spec/tools/cmd_tlm_server/interface_thread_spec.rb +3 -3
  101. data/spec/top_level/top_level_spec.rb +8 -8
  102. data/spec/utilities/csv_spec.rb +3 -3
  103. data/spec/utilities/message_log_spec.rb +3 -3
  104. data/spec/utilities/ruby_lex_utils_spec.rb +7 -7
  105. data/test/performance/config/tools/launcher/launcher_threads.txt +8 -1
  106. data/test/performance/tools/CmdTlmServerMemProf +1 -1
  107. data/test/performance/tools/TlmGrapherMemProf +19 -0
  108. data/test/performance/tools/TlmGrapherMemProf.bat +59 -0
  109. 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<String, Object, Array, Symbol|nil>] Array consisting of
424
- # \[item name, item value, item limits settings, item limits state] where the item limits
425
- # state can be one of {Cosmos::Limits::LIMITS_STATES}
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.text = 'attempting'
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.nil?
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
- connect()
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
- @cancel_thread = true
111
- @thread_sleeper.cancel
112
- @interface.disconnect
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 both
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 = false)
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
- packets = build_packets(System.commands, target_names) if section.type == :CMD
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 build_packets(packet_accessor, target_names)
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 comamnd combobox selection
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(Cosmos.getBrush(@color))
43
+ painter.setBrush(@color)
44
44
  painter.drawEllipse(@point, @width, @width)
45
45
  end
46
46
  painter.restore
@@ -51,7 +51,7 @@ module Cosmos
51
51
  painter.setPen(pen)
52
52
  painter.drawLine(@x1, @y1, @x2, @y2)
53
53
  if (@connector == true)
54
- painter.setBrush(Cosmos.getBrush(color))
54
+ painter.setBrush(color)
55
55
  painter.drawEllipse(@point, @width, @width)
56
56
  end
57
57
  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.getBrush(Cosmos::BLACK))
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.getBrush(Cosmos::BLACK))
45
+ dc.setBrush(Cosmos::BLACK)
46
46
  dc.drawPolygon(top_triangle)
47
47
 
48
48
  # Draw overall border
@@ -27,7 +27,7 @@ class HazardousError < StandardError
27
27
  attr_accessor :hazardous_description
28
28
  end
29
29
 
30
- # The COSMOS (COmprehensive SysteM Operations Suite) system is almost
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.
@@ -175,7 +175,7 @@ class RubyLexUtils
175
175
  @lex.set_input(@lex_io)
176
176
  while token = @lex.token
177
177
  if BLOCK_BEGINNING_TOKENS.include?(token.class)
178
- return token.class
178
+ return true
179
179
  end
180
180
  end
181
181
  return false
@@ -1,12 +1,12 @@
1
1
  # encoding: ascii-8bit
2
2
 
3
- COSMOS_VERSION = '3.3.3'
3
+ COSMOS_VERSION = '3.4.0'
4
4
  module Cosmos
5
5
  module Version
6
6
  MAJOR = '3'
7
- MINOR = '3'
8
- PATCH = '3'
9
- BUILD = '0c7720497e1ce22a447e7e6d571db7b4c0ffd886'
7
+ MINOR = '4'
8
+ PATCH = '0'
9
+ BUILD = '9a5a2f777b1122ed55b49caf2febf113a223eeaa'
10
10
  end
11
- VERSION = '3.3.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 be_falsey
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 be_falsey
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 be_truthy
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 be_falsey
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 be_falsey
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 be_truthy
86
+ expect(@clipped_line[5]).to be true
87
87
  end
88
88
  end
89
89