cosmos 3.8.3 → 3.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +3 -3
  3. data/Manifest.txt +14 -0
  4. data/Rakefile +35 -2
  5. data/autohotkey/config/targets/INST/screens/_footer.txt +4 -0
  6. data/autohotkey/config/targets/INST/screens/hs.txt +1 -4
  7. data/autohotkey/config/tools/table_manager/OldOneDimensionalTable_def.txt +19 -0
  8. data/autohotkey/config/tools/table_manager/OldTwoDimensionalTable_def.txt +248 -0
  9. data/autohotkey/config/tools/table_manager/OneDimensionalTable_def.txt +27 -15
  10. data/autohotkey/config/tools/table_manager/TwoDimensionalTable_def.txt +12 -232
  11. data/autohotkey/procedures/example_test.rb +4 -0
  12. data/autohotkey/tools/TableManagerAHK +4 -9
  13. data/autohotkey/tools/TableManagerAHK2 +18 -0
  14. data/autohotkey/tools/TableManagerAHK3 +18 -0
  15. data/autohotkey/tools/TableManagerAHK4 +24 -0
  16. data/autohotkey/tools/TlmViewerAHK +1 -1
  17. data/autohotkey/tools/autohotkey.rb +2 -1
  18. data/autohotkey/tools/open_gl_builder.ahk +1 -1
  19. data/autohotkey/tools/table_manager.ahk +141 -70
  20. data/cosmos.gemspec +3 -3
  21. data/data/crc.txt +70 -68
  22. data/data/legal.txt +4 -5
  23. data/demo/config/data/crc.txt +10 -9
  24. data/demo/config/targets/INST/screens/_footer.txt +4 -0
  25. data/demo/config/targets/INST/screens/hs.txt +1 -6
  26. data/demo/config/targets/INST/screens/limits.txt +3 -11
  27. data/demo/config/tools/cmd_tlm_server/cmd_tlm_server.txt +1 -0
  28. data/demo/config/tools/table_manager/MCConfigurationTable_fsw1_def.txt +33 -22
  29. data/demo/config/tools/table_manager/MCConfigurationTable_fsw2_def.txt +30 -22
  30. data/demo/config/tools/table_manager/PPSSelectionTable_def.txt +8 -7
  31. data/demo/config/tools/table_manager/TLMMonitoringTable_def.txt +13 -13
  32. data/demo/lib/example_background_task.rb +6 -12
  33. data/demo/procedures/example_test.rb +5 -0
  34. data/lib/cosmos/conversions/conversion.rb +3 -7
  35. data/lib/cosmos/core_ext/class.rb +3 -1
  36. data/lib/cosmos/core_ext/file.rb +1 -0
  37. data/lib/cosmos/core_ext/io.rb +18 -0
  38. data/lib/cosmos/core_ext/range.rb +1 -5
  39. data/lib/cosmos/core_ext/time.rb +3 -3
  40. data/lib/cosmos/gui/dialogs/about_dialog.rb +60 -36
  41. data/lib/cosmos/gui/dialogs/calendar_dialog.rb +10 -14
  42. data/lib/cosmos/gui/dialogs/cmd_details_dialog.rb +4 -5
  43. data/lib/cosmos/gui/dialogs/cmd_tlm_raw_dialog.rb +31 -17
  44. data/lib/cosmos/gui/dialogs/details_dialog.rb +63 -47
  45. data/lib/cosmos/gui/dialogs/exception_dialog.rb +77 -68
  46. data/lib/cosmos/gui/dialogs/exception_list_dialog.rb +6 -5
  47. data/lib/cosmos/gui/dialogs/legal_dialog.rb +34 -21
  48. data/lib/cosmos/gui/dialogs/packet_log_dialog.rb +19 -43
  49. data/lib/cosmos/gui/dialogs/progress_dialog.rb +79 -42
  50. data/lib/cosmos/gui/dialogs/pry_dialog.rb +9 -5
  51. data/lib/cosmos/gui/dialogs/scroll_text_dialog.rb +6 -4
  52. data/lib/cosmos/gui/dialogs/select_dialog.rb +23 -18
  53. data/lib/cosmos/gui/dialogs/set_tlm_dialog.rb +34 -10
  54. data/lib/cosmos/gui/dialogs/splash.rb +18 -8
  55. data/lib/cosmos/gui/dialogs/tlm_details_dialog.rb +38 -43
  56. data/lib/cosmos/gui/dialogs/tlm_edit_dialog.rb +51 -53
  57. data/lib/cosmos/gui/line_graph/line_graph_scaling.rb +1 -1
  58. data/lib/cosmos/gui/line_graph/lines.rb +1 -1
  59. data/lib/cosmos/gui/qt.rb +9 -2
  60. data/lib/cosmos/gui/qt_tool.rb +50 -8
  61. data/lib/cosmos/gui/widgets/packet_log_frame.rb +53 -27
  62. data/lib/cosmos/interfaces/linc_interface.rb +103 -62
  63. data/lib/cosmos/io/json_drb_object.rb +3 -3
  64. data/lib/cosmos/io/raw_logger.rb +4 -8
  65. data/lib/cosmos/io/tcpip_server.rb +2 -2
  66. data/lib/cosmos/packets/binary_accessor.rb +1 -1
  67. data/lib/cosmos/packets/limits.rb +2 -5
  68. data/lib/cosmos/packets/packet.rb +1 -1
  69. data/lib/cosmos/packets/packet_config.rb +54 -19
  70. data/lib/cosmos/packets/parsers/packet_item_parser.rb +7 -1
  71. data/lib/cosmos/script/scripting.rb +4 -5
  72. data/lib/cosmos/system/system.rb +2 -1
  73. data/lib/cosmos/system/target.rb +4 -0
  74. data/lib/cosmos/tools/cmd_tlm_server/background_task.rb +13 -5
  75. data/lib/cosmos/tools/cmd_tlm_server/background_tasks.rb +37 -27
  76. data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server.rb +6 -2
  77. data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_config.rb +7 -5
  78. data/lib/cosmos/tools/cmd_tlm_server/gui/status_tab.rb +21 -10
  79. data/lib/cosmos/tools/limits_monitor/limits_monitor.rb +11 -11
  80. data/lib/cosmos/tools/script_runner/script_runner.rb +2 -18
  81. data/lib/cosmos/tools/script_runner/script_runner_frame.rb +6 -6
  82. data/lib/cosmos/tools/table_manager/table.rb +32 -41
  83. data/lib/cosmos/tools/table_manager/table_config.rb +140 -729
  84. data/lib/cosmos/tools/table_manager/table_item.rb +20 -36
  85. data/lib/cosmos/tools/table_manager/table_item_parser.rb +46 -0
  86. data/lib/cosmos/tools/table_manager/table_manager.rb +754 -691
  87. data/lib/cosmos/tools/table_manager/table_manager_core.rb +172 -358
  88. data/lib/cosmos/tools/table_manager/table_parser.rb +75 -0
  89. data/lib/cosmos/tools/test_runner/results_writer.rb +1 -1
  90. data/lib/cosmos/tools/test_runner/test_runner.rb +11 -0
  91. data/lib/cosmos/tools/tlm_grapher/data_object_adders/housekeeping_data_object_adder.rb +2 -2
  92. data/lib/cosmos/tools/tlm_grapher/data_object_adders/singlexy_data_object_adder.rb +2 -2
  93. data/lib/cosmos/tools/tlm_grapher/data_object_adders/xy_data_object_adder.rb +2 -2
  94. data/lib/cosmos/tools/tlm_grapher/data_objects/data_object.rb +4 -4
  95. data/lib/cosmos/tools/tlm_grapher/data_objects/housekeeping_data_object.rb +13 -13
  96. data/lib/cosmos/tools/tlm_grapher/data_objects/linegraph_data_object.rb +9 -9
  97. data/lib/cosmos/tools/tlm_grapher/data_objects/xy_data_object.rb +9 -9
  98. data/lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_config.rb +4 -4
  99. data/lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_tool.rb +1 -1
  100. data/lib/cosmos/tools/tlm_viewer/tlm_viewer.rb +8 -18
  101. data/lib/cosmos/tools/tlm_viewer/tlm_viewer_config.rb +7 -4
  102. data/lib/cosmos/top_level.rb +12 -0
  103. data/lib/cosmos/version.rb +5 -5
  104. data/run_gui_tests.bat +6 -0
  105. data/spec/core_ext/array_spec.rb +1 -1
  106. data/spec/interfaces/linc_interface_spec.rb +4 -4
  107. data/spec/io/json_drb_spec.rb +2 -2
  108. data/spec/io/json_rpc_spec.rb +1 -1
  109. data/spec/io/raw_logger_spec.rb +5 -1
  110. data/spec/packet_logs/packet_log_writer_spec.rb +1 -1
  111. data/spec/packets/packet_config_spec.rb +144 -0
  112. data/spec/packets/parsers/packet_item_parser_spec.rb +60 -0
  113. data/spec/spec_helper.rb +11 -0
  114. data/spec/system/target_spec.rb +5 -1
  115. data/spec/tools/cmd_tlm_server/background_task_spec.rb +15 -3
  116. data/spec/tools/cmd_tlm_server/background_tasks_spec.rb +117 -31
  117. data/spec/tools/cmd_tlm_server/cmd_tlm_server_spec.rb +4 -0
  118. data/spec/tools/launcher/launcher_config_spec.rb +1 -1
  119. data/spec/tools/table_manager/table_config_spec.rb +226 -0
  120. data/spec/tools/table_manager/table_item_spec.rb +57 -0
  121. data/spec/tools/table_manager/table_parser_spec.rb +96 -0
  122. data/spec/tools/table_manager/table_spec.rb +90 -0
  123. data/spec/tools/table_manager/tablemanager_core_spec.rb +557 -0
  124. data/spec/top_level/top_level_spec.rb +9 -0
  125. data/spec/utilities/csv_spec.rb +3 -3
  126. metadata +30 -11
@@ -0,0 +1,75 @@
1
+ # encoding: ascii-8bit
2
+
3
+ # Copyright 2014 Ball Aerospace & Technologies Corp.
4
+ # All Rights Reserved.
5
+ #
6
+ # This program is free software; you can modify and/or redistribute it
7
+ # under the terms of the GNU General Public License
8
+ # as published by the Free Software Foundation; version 3 with
9
+ # attribution addendums as found in the LICENSE.txt
10
+
11
+ require 'cosmos/tools/table_manager/table'
12
+
13
+ module Cosmos
14
+ # Parses the TABLE keyword definition in table configuration files.
15
+ class TableParser < PacketParser
16
+ # @param parser [ConfigParser] Configuration parser
17
+ # @param tables [Hash] Hash of the currently defined tables
18
+ # @param warnings [Array<String>] Any warning strings generated while
19
+ # parsing this command will be appened to this array
20
+ def self.parse_table(parser, tables, warnings)
21
+ parser = TableParser.new(parser)
22
+ parser.verify_parameters()
23
+ parser.create_table(tables, warnings)
24
+ end
25
+
26
+ # Verify the correct number of arguments to the TABLE keyword
27
+ def verify_parameters
28
+ @usage = "TABLE <TABLE NAME> <ENDIANNESS: BIG_ENDIAN/LITTLE_ENDIAN> <DISPLAY: ONE_DIMENSIONAL/TWO_DIMENSIONAL> <TWO_DIMENSIONAL TABLE ROWS> <DESCRIPTION (Optional)>"
29
+ @parser.verify_num_parameters(3, 5, @usage)
30
+ end
31
+
32
+ # @param tables [Array<Table>] All tables defined in the configuration
33
+ # @param warnings [String] List of warnings to append to
34
+ def create_table(tables, warnings)
35
+ params = @parser.parameters
36
+ table_name = params[0].to_s.upcase
37
+ endianness = params[1].to_s.upcase.to_sym
38
+ if endianness != :BIG_ENDIAN && endianness != :LITTLE_ENDIAN
39
+ raise @parser.error("Invalid endianness #{params[1]}. Must be BIG_ENDIAN or LITTLE_ENDIAN.", @usage)
40
+ end
41
+ type = params[2].to_s.upcase.to_sym
42
+ case type
43
+ when :ONE_DIMENSIONAL
44
+ @parser.verify_num_parameters(3, 4, @usage)
45
+ description = params[3].to_s
46
+ when :TWO_DIMENSIONAL
47
+ @parser.verify_num_parameters(4, 5, @usage)
48
+ num_rows = params[3].to_i
49
+ description = params[4].to_s
50
+ else
51
+ raise @parser.error("Invalid display type #{params[2]}. Must be ONE_DIMENSIONAL or TWO_DIMENSIONAL.", @usage)
52
+ end
53
+ table = Table.new(table_name, endianness, type, description, @parser.filename)
54
+ table.num_rows = num_rows if type == :TWO_DIMENSIONAL
55
+ TableParser.finish_create_table(table, tables, warnings)
56
+ end
57
+
58
+ protected
59
+
60
+ def self.check_for_duplicate(tables, table)
61
+ msg = nil
62
+ if tables[Table::TARGET][table.table_name]
63
+ msg = "Table #{table.table_name} redefined."
64
+ Logger.instance.warn msg
65
+ end
66
+ msg
67
+ end
68
+
69
+ def self.finish_create_table(table, tables, warnings)
70
+ warning = TableParser.check_for_duplicate(tables, table)
71
+ warnings << warning if warning
72
+ table
73
+ end
74
+ end
75
+ end
@@ -197,7 +197,7 @@ module Cosmos
197
197
  file_list
198
198
  end
199
199
 
200
- # @param progress_dialog [ProgressDialog] The dialog that was cancelled
200
+ # @param progress_dialog [ProgressDialog] The dialog that was canceled
201
201
  def cancel_callback(progress_dialog = nil)
202
202
  @canceled = true
203
203
  return true, false
@@ -394,6 +394,17 @@ module Cosmos
394
394
  end
395
395
  end
396
396
 
397
+ # Called by cosmos_script_module by the user calling the status_bar scripting method
398
+ def script_set_status(message)
399
+ Qt.execute_in_main_thread(true) do
400
+ # Check for self.disposed? to work around crash when using SimpleCov
401
+ unless self.disposed?
402
+ status_bar = statusBar()
403
+ status_bar.showMessage(message)
404
+ end
405
+ end
406
+ end
407
+
397
408
  def continue_without_pausing_on_errors?
398
409
  if !@pause_on_error.isChecked()
399
410
  msg = ""
@@ -24,8 +24,8 @@ module Cosmos
24
24
  # Callback called when the add button is pressed - call(data_object)
25
25
  attr_accessor :add_data_object_callback
26
26
 
27
- # @parent [Qt::Widget] Parent widget to hold this frame
28
- # @orientation [Integer] How to layout the frame.
27
+ # @param parent [Qt::Widget] Parent widget to hold this frame
28
+ # @param orientation [Integer] How to layout the frame.
29
29
  # Must be Qt::Horizontal or Qt::Vertical.
30
30
  def initialize(parent, orientation = Qt::Horizontal)
31
31
  super(parent)
@@ -20,8 +20,8 @@ module Cosmos
20
20
  # Widget for adding a single X-Y data object to a plot
21
21
  class SinglexyDataObjectAdder < XyDataObjectAdder
22
22
 
23
- # @parent [Qt::Widget] Parent widget to hold this frame
24
- # @orientation [Integer] How to layout the frame.
23
+ # @param parent [Qt::Widget] Parent widget to hold this frame
24
+ # @param orientation [Integer] How to layout the frame.
25
25
  # Must be Qt::Horizontal or Qt::Vertical.
26
26
  def initialize(parent, orientation = Qt::Horizontal)
27
27
  super(parent, orientation)
@@ -24,8 +24,8 @@ module Cosmos
24
24
  # Callback called when the add button is pressed - call(data_object)
25
25
  attr_accessor :add_data_object_callback
26
26
 
27
- # @parent [Qt::Widget] Parent widget to hold this frame
28
- # @orientation [Integer] How to layout the frame.
27
+ # @param parent [Qt::Widget] Parent widget to hold this frame
28
+ # @param orientation [Integer] How to layout the frame.
29
29
  # Must be Qt::Horizontal or Qt::Vertical.
30
30
  def initialize(parent, orientation = Qt::Horizontal)
31
31
  super(parent)
@@ -147,10 +147,10 @@ module Cosmos
147
147
  end
148
148
 
149
149
  # Edits the data object by updating its settings from another data object
150
- def edit(editted_data_object)
151
- @assigned_color = editted_data_object.assigned_color
152
- @color = editted_data_object.color
153
- self.max_points_saved = editted_data_object.max_points_saved
150
+ def edit(edited_data_object)
151
+ @assigned_color = edited_data_object.assigned_color
152
+ @color = edited_data_object.color
153
+ self.max_points_saved = edited_data_object.max_points_saved
154
154
  end
155
155
 
156
156
  # Indicates if the changes made to the data object are safe to perform without reseting
@@ -304,26 +304,26 @@ module Cosmos
304
304
  end
305
305
 
306
306
  # Edits the data object - show_limits_lines is the only edit_safe? attribute
307
- def edit(editted_data_object)
308
- self.show_limits_lines = editted_data_object.show_limits_lines
309
- super(editted_data_object)
307
+ def edit(edited_data_object)
308
+ self.show_limits_lines = edited_data_object.show_limits_lines
309
+ super(edited_data_object)
310
310
  end
311
311
 
312
312
  # Determines if changes can be made to the data object without affecting data
313
313
  #
314
314
  # @param edited_data_object [DataObject] The data object which was edited
315
- def edit_safe?(editted_data_object)
316
- if @target_name != editted_data_object.target_name or
317
- @packet_name != editted_data_object.packet_name or
318
- @item_name != editted_data_object.item_name or
319
- @time_item_name != editted_data_object.time_item_name or
320
- @formatted_time_item_name != editted_data_object.formatted_time_item_name or
321
- @value_type != editted_data_object.value_type or
322
- @analysis != editted_data_object.analysis or
323
- @analysis_samples != editted_data_object.analysis_samples
315
+ def edit_safe?(edited_data_object)
316
+ if @target_name != edited_data_object.target_name or
317
+ @packet_name != edited_data_object.packet_name or
318
+ @item_name != edited_data_object.item_name or
319
+ @time_item_name != edited_data_object.time_item_name or
320
+ @formatted_time_item_name != edited_data_object.formatted_time_item_name or
321
+ @value_type != edited_data_object.value_type or
322
+ @analysis != edited_data_object.analysis or
323
+ @analysis_samples != edited_data_object.analysis_samples
324
324
  false
325
325
  else
326
- super(editted_data_object)
326
+ super(edited_data_object)
327
327
  end
328
328
  end
329
329
 
@@ -139,18 +139,18 @@ module Cosmos
139
139
  end
140
140
 
141
141
  # Edits the data object
142
- def edit(editted_data_object)
143
- super(editted_data_object)
144
- @horizontal_lines = editted_data_object.horizontal_lines
145
- if @y_offset != editted_data_object.y_offset
142
+ def edit(edited_data_object)
143
+ super(edited_data_object)
144
+ @horizontal_lines = edited_data_object.horizontal_lines
145
+ if @y_offset != edited_data_object.y_offset
146
146
  old_y_offset = @y_offset
147
- new_y_offset = editted_data_object.y_offset
147
+ new_y_offset = edited_data_object.y_offset
148
148
  @y_values.length.times {|index| @y_values[index] += (new_y_offset - old_y_offset)}
149
149
  end
150
- @y_offset = editted_data_object.y_offset
151
- @y_axis = editted_data_object.y_axis
152
- @x_states = editted_data_object.x_states
153
- @y_states = editted_data_object.y_states
150
+ @y_offset = edited_data_object.y_offset
151
+ @y_axis = edited_data_object.y_axis
152
+ @x_states = edited_data_object.x_states
153
+ @y_states = edited_data_object.y_states
154
154
  end
155
155
 
156
156
  protected
@@ -256,17 +256,17 @@ module Cosmos
256
256
  # Determines if changes can be made to the data object without affecting data
257
257
  #
258
258
  # @param edited_data_object [DataObject] The data object which was edited
259
- def edit_safe?(editted_data_object)
260
- if @target_name != editted_data_object.target_name or
261
- @packet_name != editted_data_object.packet_name or
262
- @x_item_name != editted_data_object.x_item_name or
263
- @y_item_name != editted_data_object.y_item_name or
264
- @time_item_name != editted_data_object.time_item_name or
265
- @x_value_type != editted_data_object.x_value_type or
266
- @y_value_type != editted_data_object.y_value_type
259
+ def edit_safe?(edited_data_object)
260
+ if @target_name != edited_data_object.target_name or
261
+ @packet_name != edited_data_object.packet_name or
262
+ @x_item_name != edited_data_object.x_item_name or
263
+ @y_item_name != edited_data_object.y_item_name or
264
+ @time_item_name != edited_data_object.time_item_name or
265
+ @x_value_type != edited_data_object.x_value_type or
266
+ @y_value_type != edited_data_object.y_value_type
267
267
  false
268
268
  else
269
- super(editted_data_object)
269
+ super(edited_data_object)
270
270
  end
271
271
  end
272
272
 
@@ -266,14 +266,14 @@ module Cosmos
266
266
  end
267
267
 
268
268
  # Edits a data object in the definition
269
- def edit_data_object(tab_index, plot_index, data_object_index, editted_data_object)
269
+ def edit_data_object(tab_index, plot_index, data_object_index, edited_data_object)
270
270
  data_object = @tabs[tab_index].plots[plot_index].data_objects[data_object_index]
271
- if data_object.edit_safe?(editted_data_object)
271
+ if data_object.edit_safe?(edited_data_object)
272
272
  @mutex.synchronize do
273
- data_object.edit(editted_data_object)
273
+ data_object.edit(edited_data_object)
274
274
  end
275
275
  else
276
- replace_data_object(tab_index, plot_index, data_object_index, editted_data_object)
276
+ replace_data_object(tab_index, plot_index, data_object_index, edited_data_object)
277
277
  end
278
278
  end
279
279
 
@@ -430,7 +430,7 @@ module Cosmos
430
430
  update_window_title() if delete
431
431
  statusBar.showMessage(tr("#{action.capitalize} #{item} successful"))
432
432
  else
433
- statusBar.showMessage(tr("#{action.capitalize} #{item} cancelled"))
433
+ statusBar.showMessage(tr("#{action.capitalize} #{item} canceled"))
434
434
  end
435
435
  end
436
436
  def reset(item)
@@ -36,10 +36,9 @@ module Cosmos
36
36
  end
37
37
  end
38
38
  end
39
- end # module Cosmos
39
+ end
40
40
 
41
41
  module Cosmos
42
-
43
42
  # The Telemetry Viewer Application provides a frameword for user defined
44
43
  # 'screens'. Screens can contain telemetry items but also command senders,
45
44
  # graphs, and any other user defined widgets. The TlmViewer class itself is
@@ -54,7 +53,7 @@ module Cosmos
54
53
  end
55
54
 
56
55
  def self.load_config(filename)
57
- # Determine MD5 over main config file and all screens
56
+ # Find all screen files so we can calculate MD5
58
57
  tlmviewer_files = [filename, System.initial_filename]
59
58
  additional_data = ''
60
59
  System.targets.each do |target_name, target|
@@ -68,30 +67,23 @@ module Cosmos
68
67
  additional_data << target.original_name
69
68
  end
70
69
  Dir.new(screen_dir).each do |screen_dir_filename|
71
- if screen_dir_filename[0..0] != '.'
70
+ if screen_dir_filename[0] != '.'
72
71
  tlmviewer_files << File.join(screen_dir, screen_dir_filename)
73
72
  end
74
73
  end
75
74
  end
76
75
  end
77
-
76
+ # Calculate MD5 and attempt to load marshal file
78
77
  md5 = Cosmos.md5_files(tlmviewer_files, additional_data)
79
- md5_string = md5.hexdigest
80
-
81
- # Build filename for marshal file
82
- marshal_filename = File.join(System.paths['TMP'], 'tlmviewer_' << md5_string << '.bin')
83
-
84
- # Attempt to load marshal file
78
+ marshal_filename = File.join(System.paths['TMP'], "tlmviewer_#{md5.hexdigest}.bin")
85
79
  config = Cosmos.marshal_load(marshal_filename)
86
80
  unless config
87
81
  # Marshal file load failed - Manually load configuration
88
82
  config = TlmViewerConfig.new(filename)
89
-
90
83
  # Create marshal file for next time
91
84
  Cosmos.marshal_dump(marshal_filename, config)
92
85
  end
93
-
94
- return config
86
+ config
95
87
  end
96
88
 
97
89
  def initialize(options)
@@ -555,7 +547,5 @@ module Cosmos
555
547
  end
556
548
  end
557
549
  end
558
-
559
- end # class TlmViewer
560
-
561
- end # module Cosmos
550
+ end
551
+ end
@@ -252,17 +252,20 @@ module Cosmos
252
252
  screen_dir = File.join(@current_target.dir, 'screens')
253
253
  if File.exist?(screen_dir)
254
254
  Dir.new(screen_dir).each do |filename|
255
- if filename[0..0] != '.'
256
- start_screen(File.join(screen_dir, filename))
257
- end
255
+ start_screen(File.join(screen_dir, filename)) if valid_screen_name(filename)
258
256
  end
259
257
  end
260
258
  end
261
259
 
260
+ def valid_screen_name(filename)
261
+ # Ignore directories and dot files, underscore partials, and only process txt
262
+ filename[0] != '.' && filename[0] != '_' && File.extname(filename) == '.txt'
263
+ end
264
+
262
265
  def num_screens(screen_dir)
263
266
  count = 0
264
267
  Dir.new(screen_dir).each do |filename|
265
- count += 1 if filename[0..0] != '.'
268
+ count += 1 if valid_screen_name(filename)
266
269
  end
267
270
  count
268
271
  end
@@ -616,6 +616,18 @@ module Cosmos
616
616
  end
617
617
  end
618
618
 
619
+ # Open a platform specific file browser at the given path
620
+ # @param path [String] Directory path
621
+ def self.open_file_browser(path)
622
+ if Kernel.is_windows?
623
+ self.run_process("start #{path}")
624
+ elsif Kernel.is_mac?
625
+ self.run_process("open #{path}")
626
+ else
627
+ self.run_process("xdg-open #{path}")
628
+ end
629
+ end
630
+
619
631
  # @param filename [String] Name of the file to open in the editor
620
632
  def self.open_in_text_editor(filename)
621
633
  if filename
@@ -1,12 +1,12 @@
1
1
  # encoding: ascii-8bit
2
2
 
3
- COSMOS_VERSION = '3.8.3'
3
+ COSMOS_VERSION = '3.9.1'
4
4
  module Cosmos
5
5
  module Version
6
6
  MAJOR = '3'
7
- MINOR = '8'
8
- PATCH = '3'
9
- BUILD = 'e6be858ed961d6fe872435be2b74c3499167a62a'
7
+ MINOR = '9'
8
+ PATCH = '1'
9
+ BUILD = '0d2d495007138d6145a42b4cba9176f3e606640d'
10
10
  end
11
- VERSION = '3.8.3'
11
+ VERSION = '3.9.1'
12
12
  end
@@ -13,11 +13,15 @@ call bundle exec ruby autohotkey\tools\ReplayAHK
13
13
  call bundle exec ruby autohotkey\tools\ScriptRunnerAHK -w 600 -t 800
14
14
  call bundle exec ruby autohotkey\tools\ScriptRunnerAHK2 -w 600 -t 800
15
15
  call bundle exec ruby autohotkey\tools\TableManagerAHK -w 800 -t 800
16
+ call bundle exec ruby autohotkey\tools\TableManagerAHK2 --convert config\tools\table_manager\OldOneDimensionalTable_def.txt
17
+ call bundle exec ruby autohotkey\tools\TableManagerAHK3 --convert config\tools\table_manager\OldTwoDimensionalTable_def.txt
18
+ call bundle exec ruby autohotkey\tools\TableManagerAHK4 --create config\tools\table_manager\ConfigTables_def.txt -o .
16
19
  call bundle exec ruby autohotkey\tools\TestRunnerAHK -w 800 -t 800
17
20
  call bundle exec ruby autohotkey\tools\TestRunnerAHK2 -w 800 -t 800 -c test_runner2.txt
18
21
  call bundle exec ruby autohotkey\tools\TestRunnerAHK3 -w 800 -t 800 -c test_runner3.txt
19
22
  call bundle exec ruby autohotkey\tools\TestRunnerAHK4 -w 800 -t 800 -c test_runner4.txt
20
23
  call bundle exec ruby autohotkey\tools\TestRunnerAHK5 -w 800 -t 800 --suite ExampleTestSuite --group ExampleTest --case test_3xx
24
+ REM This test intentionally fails because it is missing a --suite
21
25
  call bundle exec ruby autohotkey\tools\TestRunnerAHK6 --group ExampleTest --case test_3xx
22
26
  call bundle exec ruby autohotkey\tools\TlmGrapherAHK -w 800 -t 800
23
27
  call bundle exec ruby autohotkey\tools\TlmGrapherAHK2 -s -c test2.txt -w 1200 -t 800
@@ -28,7 +32,9 @@ call bundle exec ruby autohotkey\tools\TlmExtractorAHK2 -c tlm_extractor2.txt -i
28
32
  call bundle exec ruby autohotkey\tools\TlmExtractorAHK3 -c tlm_extractor2.txt -i tlm.bin -o outputs/logs/tlm.txt
29
33
  call bundle exec ruby autohotkey\tools\TlmViewerAHK
30
34
  call bundle exec ruby autohotkey\tools\TlmViewerAHK2 -c tlm_viewer2.txt
35
+ REM This test intentionally raises a Unknown keyword KEYWORD error
31
36
  call bundle exec ruby autohotkey\tools\TlmViewerAHK3 -s "BLAH" -c tlm_viewer3.txt
37
+ REM This test intentionally raises a NoMethodError for columns
32
38
  call bundle exec ruby autohotkey\tools\TlmViewerAHK4 -c tlm_viewer3.txt
33
39
  call bundle exec ruby autohotkey\tools\TlmViewerAHK5 -n -s "INST ADCS"
34
40
 
@@ -28,7 +28,7 @@ describe Array do
28
28
 
29
29
  describe "nearest_index" do
30
30
  it "raises error if empty" do
31
- expect { Array.new.nearest_index(nil) }.to raise_error
31
+ expect { Array.new.nearest_index(nil) }.to raise_error(/empty array/)
32
32
  end
33
33
 
34
34
  def find_sorted_value(array, sorted)