cosmos 4.3.0-java → 4.4.0-java
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/.github/ISSUE_TEMPLATE/bug_report.md +30 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +19 -0
- data/.github/ISSUE_TEMPLATE/help---usage---general-question.md +12 -0
- data/.gitignore +1 -0
- data/.travis.yml +5 -5
- data/Manifest.txt +81 -44
- data/Rakefile +9 -0
- data/appveyor.yml +2 -1
- data/autohotkey/config/targets/INST/cmd_tlm/inst_cmds.txt +1 -1
- data/autohotkey/config/targets/INST/cmd_tlm/inst_tlm.txt +5 -5
- data/autohotkey/config/targets/INST/lib/sim_inst.rb +3 -1
- data/autohotkey/config/tools/handbook_creator/assets/css/bootstrap-theme.css +397 -0
- data/autohotkey/config/tools/handbook_creator/assets/css/bootstrap-theme.min.css +7 -0
- data/autohotkey/config/tools/handbook_creator/assets/css/bootstrap.css +7118 -0
- data/autohotkey/config/tools/handbook_creator/assets/css/bootstrap.min.css +7 -0
- data/autohotkey/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/autohotkey/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.svg +229 -0
- data/autohotkey/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/autohotkey/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/autohotkey/config/tools/handbook_creator/assets/js/bootstrap.js +2006 -0
- data/autohotkey/config/tools/handbook_creator/assets/js/bootstrap.min.js +7 -0
- data/autohotkey/config/tools/table_manager/ConfigTables_def.txt +2 -4
- data/autohotkey/config/tools/table_manager/SubTables/OneDimensionalSubTable_def.txt +31 -0
- data/autohotkey/config/tools/table_manager/SubTables/TwoDimensionalSubTable_def.txt +28 -0
- data/autohotkey/config/tools/test_runner/test_runner.txt +1 -1
- data/autohotkey/config/tools/test_runner/test_runner2.txt +1 -1
- data/autohotkey/config/tools/test_runner/test_runner3.txt +1 -1
- data/autohotkey/config/tools/test_runner/test_runner4.txt +1 -1
- data/autohotkey/tools/limits_monitor.ahk +1 -1
- data/autohotkey/tools/packet_viewer.ahk +1 -1
- data/autohotkey/tools/script_runner.ahk +16 -4
- data/bin/cosmos +1 -1
- data/bin/xtce_converter +1 -1
- data/cosmos.gemspec +5 -7
- data/data/config/_interfaces.yaml +4 -0
- data/data/config/cmd_sequence.yaml +14 -0
- data/data/config/housekeeping_params.yaml +14 -0
- data/data/config/interface_modifiers.yaml +11 -0
- data/data/config/item_modifiers.yaml +2 -1
- data/data/config/launcher.yaml +12 -2
- data/data/config/param_item_modifiers.yaml +2 -2
- data/data/config/parameter_modifiers.yaml +20 -0
- data/data/config/screen.yaml +2 -0
- data/data/config/script_runner.yaml +9 -0
- data/data/config/system.yaml +47 -10
- data/data/config/table_manager.yaml +7 -0
- data/data/config/target.yaml +12 -0
- data/data/config/telemetry_modifiers.yaml +3 -1
- data/data/config/test_runner.yaml +10 -9
- data/data/config/widgets.yaml +174 -11
- data/data/crc.txt +128 -125
- data/demo/Gemfile +1 -1
- data/demo/Launcher.bat +1 -9
- data/demo/Launcher2.bat +1 -0
- data/demo/LauncherMini.bat +1 -0
- data/demo/config/data/crc.txt +40 -20
- data/demo/config/system/system.txt +1 -1
- data/demo/config/system/system_alt_ports.txt +1 -1
- data/demo/config/targets/EXAMPLE/cmd_tlm_server.txt +1 -0
- data/demo/config/targets/INST/cmd_tlm/inst_cmds.txt +2 -1
- data/demo/config/targets/INST/cmd_tlm/inst_tlm.txt +7 -7
- data/demo/config/targets/INST/cmd_tlm_server.txt +2 -0
- data/demo/config/targets/INST/lib/sim_inst.rb +15 -3
- data/demo/config/targets/INST/screens/adcs.txt +2 -2
- data/demo/config/targets/INST/screens/block.txt +1 -1
- data/demo/config/targets/INST/screens/commanding.txt +1 -1
- data/demo/config/targets/INST/screens/ground.txt +27 -5
- data/demo/config/targets/INST/screens/ground_error.gif +0 -0
- data/demo/config/{data/groundoff.gif → targets/INST/screens/ground_off.gif} +0 -0
- data/demo/config/{data/groundon.gif → targets/INST/screens/ground_on.gif} +0 -0
- data/demo/config/targets/INST/screens/limits.txt +69 -31
- data/demo/config/targets/INST/screens/other.txt +13 -3
- data/demo/config/targets/INST/screens/params.txt +54 -0
- data/demo/config/targets/INST/screens/satellite.gif +0 -0
- data/demo/config/tools/data_viewer/data_viewer.txt +3 -0
- data/demo/config/tools/handbook_creator/assets/css/bootstrap-theme.css +397 -0
- data/demo/config/tools/handbook_creator/assets/css/bootstrap-theme.min.css +7 -0
- data/demo/config/tools/handbook_creator/assets/css/bootstrap.css +7118 -0
- data/demo/config/tools/handbook_creator/assets/css/bootstrap.min.css +7 -0
- data/demo/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/demo/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.svg +229 -0
- data/demo/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/demo/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/demo/config/tools/handbook_creator/assets/img/ball_logo.bmp +0 -0
- data/demo/config/tools/handbook_creator/assets/img/ball_logo.gif +0 -0
- data/demo/config/tools/handbook_creator/assets/img/ball_logo.jpg +0 -0
- data/demo/config/tools/handbook_creator/assets/js/bootstrap.js +2006 -0
- data/demo/config/tools/handbook_creator/assets/js/bootstrap.min.js +7 -0
- data/demo/config/tools/handbook_creator/assets/js/html5shiv.js +8 -0
- data/demo/config/tools/handbook_creator/assets/js/jquery-1.10.2.min.js +6 -0
- data/demo/config/tools/handbook_creator/assets/js/respond.min.js +6 -0
- data/demo/config/tools/script_runner/script_runner.txt +1 -2
- data/demo/config/tools/test_runner/test_runner.txt +3 -1
- data/demo/lib/example_background_task.rb +1 -0
- data/demo/procedures/cosmos_api_test.rb +1 -1
- data/demo/procedures/interactive.rb +22 -0
- data/ext/cosmos/ext/packet/packet.c +0 -77
- data/install/Gemfile +1 -1
- data/install/Launcher.bat +1 -9
- data/install/config/data/crc.txt +17 -1
- data/install/config/system/system.txt +1 -1
- data/install/config/tools/handbook_creator/assets/css/bootstrap-theme.css +397 -0
- data/install/config/tools/handbook_creator/assets/css/bootstrap-theme.min.css +7 -0
- data/install/config/tools/handbook_creator/assets/css/bootstrap.css +7118 -0
- data/install/config/tools/handbook_creator/assets/css/bootstrap.min.css +7 -0
- data/install/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/install/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.svg +229 -0
- data/install/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/install/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/install/config/tools/handbook_creator/assets/img/ball_logo.bmp +0 -0
- data/install/config/tools/handbook_creator/assets/img/ball_logo.gif +0 -0
- data/install/config/tools/handbook_creator/assets/img/ball_logo.jpg +0 -0
- data/install/config/tools/handbook_creator/assets/js/bootstrap.js +2006 -0
- data/install/config/tools/handbook_creator/assets/js/bootstrap.min.js +7 -0
- data/install/config/tools/handbook_creator/assets/js/html5shiv.js +8 -0
- data/install/config/tools/handbook_creator/assets/js/jquery-1.10.2.min.js +6 -0
- data/install/config/tools/handbook_creator/assets/js/respond.min.js +6 -0
- data/lib/cosmos/config/config_parser.rb +4 -5
- data/lib/cosmos/dart/lib/dart_common.rb +1 -1
- data/lib/cosmos/gui/dialogs/details_dialog.rb +16 -1
- data/lib/cosmos/gui/dialogs/tlm_details_dialog.rb +1 -0
- data/lib/cosmos/gui/dialogs/tlm_graph_dialog.rb +4 -2
- data/lib/cosmos/gui/opengl/earth_model.rb +1 -1
- data/lib/cosmos/gui/qt.rb +3 -1
- data/lib/cosmos/gui/qt_tool.rb +46 -23
- data/lib/cosmos/gui/text/ruby_editor.rb +44 -41
- data/lib/cosmos/gui/utilities/screenshot.rb +1 -1
- data/lib/cosmos/gui/utilities/script_module_gui.rb +92 -92
- data/lib/cosmos/interfaces.rb +1 -0
- data/lib/cosmos/interfaces/interface.rb +5 -1
- data/lib/cosmos/interfaces/protocols/fixed_protocol.rb +40 -18
- data/lib/cosmos/interfaces/protocols/template_protocol.rb +6 -1
- data/lib/cosmos/interfaces/simulated_target_interface.rb +14 -5
- data/lib/cosmos/io/json_drb.rb +11 -7
- data/lib/cosmos/packets/commands.rb +28 -11
- data/lib/cosmos/packets/packet.rb +69 -32
- data/lib/cosmos/packets/packet_config.rb +34 -1
- data/lib/cosmos/packets/parsers/state_parser.rb +0 -1
- data/lib/cosmos/packets/parsers/xtce_converter.rb +2 -0
- data/lib/cosmos/packets/parsers/xtce_parser.rb +4 -3
- data/lib/cosmos/packets/structure.rb +4 -2
- data/lib/cosmos/packets/telemetry.rb +19 -3
- data/lib/cosmos/script/api_shared.rb +12 -9
- data/lib/cosmos/script/scripting.rb +16 -14
- data/lib/cosmos/system/system.rb +39 -20
- data/lib/cosmos/system/target.rb +39 -9
- data/lib/cosmos/tools/cmd_extractor/cmd_extractor.rb +94 -35
- data/lib/cosmos/tools/cmd_sender/cmd_sender.rb +3 -0
- data/lib/cosmos/tools/cmd_sequence/sequence_item.rb +1 -1
- data/lib/cosmos/tools/cmd_tlm_server/background_tasks.rb +2 -0
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server.rb +30 -4
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_config.rb +1 -0
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui.rb +9 -12
- data/lib/cosmos/tools/cmd_tlm_server/gui/packets_tab.rb +5 -2
- data/lib/cosmos/tools/cmd_tlm_server/routers.rb +2 -0
- data/lib/cosmos/tools/config_editor/config_editor.rb +80 -24
- data/lib/cosmos/tools/config_editor/config_editor_frame.rb +2 -0
- data/lib/cosmos/tools/data_viewer/data_viewer.rb +15 -9
- data/lib/cosmos/tools/data_viewer/dump_component.rb +2 -9
- data/lib/cosmos/tools/data_viewer/text_component.rb +77 -0
- data/lib/cosmos/tools/handbook_creator/handbook_creator.rb +64 -38
- data/lib/cosmos/tools/launcher/launcher.rb +1 -0
- data/lib/cosmos/tools/limits_monitor/limits_monitor.rb +31 -17
- data/lib/cosmos/tools/packet_viewer/packet_viewer.rb +8 -6
- data/lib/cosmos/tools/script_runner/script_runner.rb +87 -29
- data/lib/cosmos/tools/script_runner/script_runner_config.rb +14 -0
- data/lib/cosmos/tools/script_runner/script_runner_frame.rb +41 -7
- data/lib/cosmos/tools/table_manager/table_config.rb +5 -3
- data/lib/cosmos/tools/table_manager/table_manager.rb +6 -3
- data/lib/cosmos/tools/test_runner/test_runner.rb +14 -9
- data/lib/cosmos/tools/test_runner/test_runner_chooser.rb +21 -9
- data/lib/cosmos/tools/tlm_extractor/tlm_extractor.rb +3 -3
- data/lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_realtime_thread.rb +5 -8
- data/lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_tool.rb +11 -8
- data/lib/cosmos/tools/tlm_grapher/tlm_grapher.rb +9 -15
- data/lib/cosmos/tools/tlm_viewer/screen.rb +3 -1
- data/lib/cosmos/tools/tlm_viewer/tlm_viewer.rb +19 -13
- data/lib/cosmos/tools/tlm_viewer/widgets.rb +2 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/aging_widget.rb +4 -5
- data/lib/cosmos/tools/tlm_viewer/widgets/array_widget.rb +3 -4
- data/lib/cosmos/tools/tlm_viewer/widgets/block_widget.rb +4 -5
- data/lib/cosmos/tools/tlm_viewer/widgets/canvas_clickable.rb +16 -2
- data/lib/cosmos/tools/tlm_viewer/widgets/canvas_widget.rb +17 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/canvasdot_widget.rb +1 -2
- data/lib/cosmos/tools/tlm_viewer/widgets/canvasellipse_widget.rb +1 -1
- data/lib/cosmos/tools/tlm_viewer/widgets/canvasimage_widget.rb +12 -7
- data/lib/cosmos/tools/tlm_viewer/widgets/canvasimagevalue_widget.rb +79 -29
- data/lib/cosmos/tools/tlm_viewer/widgets/canvaslabel_widget.rb +1 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/canvaslabelvalue_widget.rb +2 -1
- data/lib/cosmos/tools/tlm_viewer/widgets/canvasline_widget.rb +2 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/canvaslinevalue_widget.rb +4 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/canvasvalue_widget.rb +33 -25
- data/lib/cosmos/tools/tlm_viewer/widgets/checkbutton_widget.rb +5 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/combobox_widget.rb +5 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/formatfontvalue_widget.rb +1 -1
- data/lib/cosmos/tools/tlm_viewer/widgets/formatvalue_widget.rb +4 -7
- data/lib/cosmos/tools/tlm_viewer/widgets/horizontal_widget.rb +5 -5
- data/lib/cosmos/tools/tlm_viewer/widgets/horizontalbox_widget.rb +6 -7
- data/lib/cosmos/tools/tlm_viewer/widgets/horizontalline_widget.rb +2 -4
- data/lib/cosmos/tools/tlm_viewer/widgets/label_widget.rb +10 -8
- data/lib/cosmos/tools/tlm_viewer/widgets/labelformatvalue_widget.rb +2 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/labelled_widget.rb +58 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/labelprogressbar_widget.rb +3 -4
- data/lib/cosmos/tools/tlm_viewer/widgets/labeltrendlimitsbar_widget.rb +2 -4
- data/lib/cosmos/tools/tlm_viewer/widgets/labelvalue_widget.rb +2 -1
- data/lib/cosmos/tools/tlm_viewer/widgets/labelvaluedesc_widget.rb +3 -5
- data/lib/cosmos/tools/tlm_viewer/widgets/labelvaluelimitsbar_widget.rb +2 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/labelvaluelimitscolumn_widget.rb +2 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/labelvaluerangebar_widget.rb +2 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/labelvaluerangecolumn_widget.rb +2 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/layout_widget.rb +3 -5
- data/lib/cosmos/tools/tlm_viewer/widgets/led_widget.rb +108 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/limits_widget.rb +60 -10
- data/lib/cosmos/tools/tlm_viewer/widgets/limitsbar_widget.rb +22 -8
- data/lib/cosmos/tools/tlm_viewer/widgets/limitscolor_widget.rb +19 -13
- data/lib/cosmos/tools/tlm_viewer/widgets/limitscolumn_widget.rb +22 -8
- data/lib/cosmos/tools/tlm_viewer/widgets/linegraph_widget.rb +2 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/matrixbycolumns_widget.rb +4 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/multi_widget.rb +1 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/progressbar_widget.rb +10 -5
- data/lib/cosmos/tools/tlm_viewer/widgets/radiobutton_widget.rb +7 -4
- data/lib/cosmos/tools/tlm_viewer/widgets/rangebar_widget.rb +4 -6
- data/lib/cosmos/tools/tlm_viewer/widgets/rangecolumn_widget.rb +3 -5
- data/lib/cosmos/tools/tlm_viewer/widgets/screenshotbutton_widget.rb +4 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/scrollwindow_widget.rb +2 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/sectionheader_widget.rb +2 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/spacer_widget.rb +4 -6
- data/lib/cosmos/tools/tlm_viewer/widgets/tabbook_widget.rb +2 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/tabitem_widget.rb +2 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/textbox_widget.rb +13 -4
- data/lib/cosmos/tools/tlm_viewer/widgets/textfield_widget.rb +3 -4
- data/lib/cosmos/tools/tlm_viewer/widgets/timegraph_widget.rb +2 -7
- data/lib/cosmos/tools/tlm_viewer/widgets/title_widget.rb +6 -12
- data/lib/cosmos/tools/tlm_viewer/widgets/trendbar_widget.rb +5 -10
- data/lib/cosmos/tools/tlm_viewer/widgets/trendlimitsbar_widget.rb +5 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/value_widget.rb +4 -4
- data/lib/cosmos/tools/tlm_viewer/widgets/valuelimitsbar_widget.rb +2 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/valuelimitscolumn_widget.rb +2 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/valuerangebar_widget.rb +3 -4
- data/lib/cosmos/tools/tlm_viewer/widgets/valuerangecolumn_widget.rb +2 -3
- data/lib/cosmos/tools/tlm_viewer/widgets/vertical_widget.rb +8 -7
- data/lib/cosmos/tools/tlm_viewer/widgets/verticalbox_widget.rb +9 -7
- data/lib/cosmos/tools/tlm_viewer/widgets/widget.rb +54 -46
- data/lib/cosmos/top_level.rb +23 -12
- data/lib/cosmos/version.rb +4 -4
- data/spec/gui/utilities/script_module_gui_spec.rb +44 -63
- data/spec/install/config/targets/INST/cmd_tlm/inst_cmds.txt +1 -1
- data/spec/install/config/targets/INST/cmd_tlm/inst_tlm.txt +5 -5
- data/spec/install/yaml_docs_spec.rb +112 -0
- data/spec/interfaces/protocols/fixed_protocol_spec.rb +20 -9
- data/spec/interfaces/protocols/template_protocol_spec.rb +78 -25
- data/spec/packets/commands_spec.rb +22 -0
- data/spec/packets/packet_config_spec.rb +24 -0
- data/spec/packets/packet_item_spec.rb +2 -2
- data/spec/packets/packet_spec.rb +39 -6
- data/spec/packets/parsers/state_parser_spec.rb +33 -11
- data/spec/packets/structure_spec.rb +41 -0
- data/spec/packets/telemetry_spec.rb +23 -0
- data/spec/streams/tcpip_socket_stream_spec.rb +32 -27
- data/spec/system/system_spec.rb +77 -2
- data/spec/system/target_spec.rb +62 -1
- data/spec/tools/cmd_tlm_server/api_spec.rb +1 -1
- data/spec/tools/cmd_tlm_server/background_tasks_spec.rb +15 -7
- data/spec/top_level/top_level_spec.rb +29 -5
- data/tasks/gemfile_stats.rake +28 -14
- data/test/performance/config/system/system.txt +0 -0
- data/test/performance/config/targets/PACKET/cmd_tlm/packet_tlm.txt +5 -5
- data/test/performance/config/tools/handbook_creator/assets/css/bootstrap-theme.css +397 -0
- data/test/performance/config/tools/handbook_creator/assets/css/bootstrap-theme.min.css +7 -0
- data/test/performance/config/tools/handbook_creator/assets/css/bootstrap.css +7118 -0
- data/test/performance/config/tools/handbook_creator/assets/css/bootstrap.min.css +7 -0
- data/test/performance/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/test/performance/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.svg +229 -0
- data/test/performance/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/test/performance/config/tools/handbook_creator/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/test/performance/config/tools/handbook_creator/assets/img/ball_logo.bmp +0 -0
- data/test/performance/config/tools/handbook_creator/assets/img/ball_logo.gif +0 -0
- data/test/performance/config/tools/handbook_creator/assets/img/ball_logo.jpg +0 -0
- data/test/performance/config/tools/handbook_creator/assets/js/bootstrap.js +2006 -0
- data/test/performance/config/tools/handbook_creator/assets/js/bootstrap.min.js +7 -0
- data/test/performance/config/tools/handbook_creator/assets/js/html5shiv.js +8 -0
- data/test/performance/config/tools/handbook_creator/assets/js/jquery-1.10.2.min.js +6 -0
- data/test/performance/config/tools/handbook_creator/assets/js/respond.min.js +6 -0
- data/test/performance/config/tools/test_runner/test_runner.txt +1 -1
- data/test/performance/procedures/cosmos_api_test.rb +1 -1
- data/test/performance/tools/identify_performance.rb +82 -0
- metadata +92 -55
|
@@ -12,7 +12,6 @@ require 'ostruct'
|
|
|
12
12
|
require 'cosmos/tools/tlm_viewer/widgets/widget'
|
|
13
13
|
|
|
14
14
|
module Cosmos
|
|
15
|
-
|
|
16
15
|
# This class is a common base class for LimitsbarWidget and
|
|
17
16
|
# LimitscolumnWidget and should not be instantiated
|
|
18
17
|
class LimitsWidget < Qt::Label
|
|
@@ -29,6 +28,8 @@ module Cosmos
|
|
|
29
28
|
@bar_width = @width - (2 * @x_pad)
|
|
30
29
|
@bar_height = @height - (2 * @y_pad)
|
|
31
30
|
@painter = nil
|
|
31
|
+
@min_value = nil # no minimum
|
|
32
|
+
@max_value = nil # no maximum
|
|
32
33
|
setFixedSize(width.to_i, height.to_i)
|
|
33
34
|
parent_layout.addWidget(self) if parent_layout
|
|
34
35
|
end
|
|
@@ -48,6 +49,18 @@ module Cosmos
|
|
|
48
49
|
update()
|
|
49
50
|
end
|
|
50
51
|
|
|
52
|
+
def process_settings
|
|
53
|
+
super
|
|
54
|
+
@settings.each do |setting_name, setting_values|
|
|
55
|
+
case setting_name
|
|
56
|
+
when 'MIN_VALUE'
|
|
57
|
+
@min_value = setting_values[0].to_f
|
|
58
|
+
when 'MAX_VALUE'
|
|
59
|
+
@max_value = setting_values[0].to_f
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
51
64
|
def paintEvent(event)
|
|
52
65
|
begin
|
|
53
66
|
return if @painter
|
|
@@ -73,7 +86,7 @@ module Cosmos
|
|
|
73
86
|
limits
|
|
74
87
|
end
|
|
75
88
|
|
|
76
|
-
def calculate_widths(limits, length)
|
|
89
|
+
def calculate_widths(limits, length, min_value = nil, max_value = nil)
|
|
77
90
|
red_low = limits[0]
|
|
78
91
|
yellow_low = limits[1]
|
|
79
92
|
yellow_high = limits[2]
|
|
@@ -83,24 +96,62 @@ module Cosmos
|
|
|
83
96
|
|
|
84
97
|
widths = OpenStruct.new
|
|
85
98
|
# Calculate sizes of limits sections
|
|
99
|
+
# By default the red low and red high sections are each
|
|
100
|
+
# 10% of the total bar length. After the value goes beyond
|
|
101
|
+
# a certain point it just rails on the red section.
|
|
86
102
|
widths.red_low = (0.1 * length).round
|
|
87
103
|
widths.red_high = (0.1 * length).round
|
|
88
104
|
|
|
89
|
-
|
|
105
|
+
if min_value
|
|
106
|
+
# If the red low is less than the min value we don't display the red low box
|
|
107
|
+
if red_low <= min_value
|
|
108
|
+
red_low = min_value
|
|
109
|
+
widths.red_low = 0
|
|
110
|
+
end
|
|
111
|
+
# Determine if any other limits values need to change
|
|
112
|
+
yellow_low = min_value if yellow_low <= min_value
|
|
113
|
+
green_low = min_value if green_low && green_low <= min_value
|
|
114
|
+
green_high = min_value if green_high && green_high <= min_value
|
|
115
|
+
yellow_high = min_value if yellow_high <= min_value
|
|
116
|
+
red_high = min_value if red_high <= min_value
|
|
117
|
+
end
|
|
118
|
+
if max_value
|
|
119
|
+
# If the red high is greater than the max value we don't display the red high box
|
|
120
|
+
if red_high >= max_value
|
|
121
|
+
red_high = max_value
|
|
122
|
+
widths.red_high = 0
|
|
123
|
+
end
|
|
124
|
+
# Determine if any other limits values need to change
|
|
125
|
+
yellow_high = max_value if yellow_high >= max_value
|
|
126
|
+
green_high = max_value if green_high && green_high >= max_value
|
|
127
|
+
green_low = max_value if green_low && green_low >= max_value
|
|
128
|
+
yellow_low = max_value if yellow_low >= max_value
|
|
129
|
+
red_low = max_value if red_low >= max_value
|
|
130
|
+
end
|
|
90
131
|
|
|
91
|
-
|
|
92
|
-
widths.
|
|
132
|
+
# If red == yellow it means there is no red width
|
|
133
|
+
widths.red_low = 0 if red_low == yellow_low
|
|
134
|
+
widths.red_high = 0 if red_high == yellow_high
|
|
135
|
+
# Start with a scale of 0.8 in case we display the red
|
|
136
|
+
scale = 0.8
|
|
137
|
+
# Move the scale up if we're not displaying red
|
|
138
|
+
scale += 0.1 if widths.red_low == 0
|
|
139
|
+
scale += 0.1 if widths.red_high == 0
|
|
140
|
+
|
|
141
|
+
inner_value_range = red_high - red_low
|
|
142
|
+
widths.yellow_low = ((yellow_low - red_low) / inner_value_range * scale * length).round
|
|
143
|
+
widths.yellow_high = ((red_high - yellow_high) / inner_value_range * scale * length).round
|
|
93
144
|
|
|
94
145
|
if green_high
|
|
95
|
-
widths.green_low = ((green_low - yellow_low) / inner_value_range *
|
|
96
|
-
widths.green_high = ((yellow_high - green_high) / inner_value_range *
|
|
146
|
+
widths.green_low = ((green_low - yellow_low) / inner_value_range * scale * length).round
|
|
147
|
+
widths.green_high = ((yellow_high - green_high) / inner_value_range * scale * length).round
|
|
97
148
|
widths.blue = length - widths.red_low - widths.yellow_low - widths.green_low -
|
|
98
149
|
widths.green_high - widths.yellow_high - widths.red_high
|
|
99
150
|
else
|
|
100
151
|
widths.green = length - widths.red_low - widths.yellow_low -
|
|
101
152
|
widths.yellow_high - widths.red_high
|
|
102
153
|
end
|
|
103
|
-
widths
|
|
154
|
+
return [red_low, yellow_low, yellow_high, red_high, green_low, green_high], widths
|
|
104
155
|
end
|
|
105
156
|
|
|
106
157
|
protected
|
|
@@ -109,5 +160,4 @@ module Cosmos
|
|
|
109
160
|
# Do nothing
|
|
110
161
|
end
|
|
111
162
|
end
|
|
112
|
-
|
|
113
|
-
end # module Cosmos
|
|
163
|
+
end
|
|
@@ -11,9 +11,10 @@
|
|
|
11
11
|
require 'cosmos/tools/tlm_viewer/widgets/limits_widget'
|
|
12
12
|
|
|
13
13
|
module Cosmos
|
|
14
|
-
|
|
14
|
+
# Draw a bar which consists of the red low, yellow low, green with potentially
|
|
15
|
+
# a blue operational limits inside it, yellow high, and red high. Then draw a
|
|
16
|
+
# vertical black bar with a little black triangle at the current value location.
|
|
15
17
|
class LimitsbarWidget < LimitsWidget
|
|
16
|
-
|
|
17
18
|
def initialize(parent_layout, target_name, packet_name, item_name, value_type = :CONVERTED, width = 160, height = 25)
|
|
18
19
|
super(parent_layout, target_name, packet_name, item_name, value_type, width, height)
|
|
19
20
|
end
|
|
@@ -26,7 +27,7 @@ module Cosmos
|
|
|
26
27
|
limits = get_limits()
|
|
27
28
|
return unless limits
|
|
28
29
|
|
|
29
|
-
widths = calculate_widths(limits, @bar_width)
|
|
30
|
+
limits, widths = calculate_widths(limits, @bar_width, @min_value, @max_value)
|
|
30
31
|
|
|
31
32
|
# Set starting points
|
|
32
33
|
x_pos = @x_pad
|
|
@@ -77,9 +78,23 @@ module Cosmos
|
|
|
77
78
|
# Draw line at current value
|
|
78
79
|
red_low = limits[0]
|
|
79
80
|
red_high = limits[3]
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
# Start with a diviser of 0.8 assuming we'll draw red limits
|
|
82
|
+
diviser = 0.8
|
|
83
|
+
# If there is a min or max value equal to the min or or max red limit
|
|
84
|
+
# it means we're not drawing red bar and the diviser increases
|
|
85
|
+
diviser += 0.1 if @min_value && limits[0] == @min_value
|
|
86
|
+
diviser += 0.1 if @max_value && limits[3] == @max_value
|
|
87
|
+
@bar_scale = (red_high - red_low) / diviser
|
|
88
|
+
if @min_value && @min_value >= red_low
|
|
89
|
+
@low_value = @min_value
|
|
90
|
+
else
|
|
91
|
+
@low_value = red_low - 0.1 * @bar_scale
|
|
92
|
+
end
|
|
93
|
+
if @max_value && @max_value <= red_high
|
|
94
|
+
@high_value = @max_value
|
|
95
|
+
else
|
|
96
|
+
@high_value = red_high + 0.1 * @bar_scale
|
|
97
|
+
end
|
|
83
98
|
|
|
84
99
|
if @value.is_a?(Float) && (@value.infinite? || @value.nan?)
|
|
85
100
|
if @value.infinite? == 1
|
|
@@ -112,5 +127,4 @@ module Cosmos
|
|
|
112
127
|
additional_drawing(dc)
|
|
113
128
|
end
|
|
114
129
|
end
|
|
115
|
-
|
|
116
|
-
end # module Cosmos
|
|
130
|
+
end
|
|
@@ -11,25 +11,31 @@
|
|
|
11
11
|
require 'cosmos/tools/tlm_viewer/widgets/widget'
|
|
12
12
|
|
|
13
13
|
module Cosmos
|
|
14
|
-
|
|
14
|
+
# Displays a circle indicating the given telemetry point's limit state
|
|
15
|
+
# (red, yellow, green, blue). The circle is followed by the telemetry
|
|
16
|
+
# item name unless nil is passed to the full_label_display.
|
|
15
17
|
class LimitscolorWidget < Qt::Label
|
|
16
18
|
include Widget
|
|
17
19
|
|
|
18
|
-
def initialize(parent_layout, target_name, packet_name, item_name, value_type = :CONVERTED, radius = 10,
|
|
20
|
+
def initialize(parent_layout, target_name, packet_name, item_name, value_type = :CONVERTED, radius = 10, full_label_display = false)
|
|
19
21
|
super(target_name, packet_name, item_name, value_type)
|
|
20
22
|
@value_type = :CONVERTED if @value_type == :WITH_UNITS
|
|
21
|
-
|
|
23
|
+
full_label_display = ConfigParser::handle_true_false_nil(full_label_display)
|
|
22
24
|
@painter = nil
|
|
23
25
|
@foreground = Cosmos::BLACK
|
|
24
26
|
parent_layout.addWidget(self) if parent_layout
|
|
25
27
|
@font = font()
|
|
26
28
|
metrics = Cosmos.getFontMetrics(@font)
|
|
27
|
-
if
|
|
29
|
+
if full_label_display
|
|
28
30
|
@item_text = "#{@target_name} #{@packet_name} #{@item_name}"
|
|
29
|
-
|
|
31
|
+
text_width = metrics.width(@item_text)
|
|
32
|
+
elsif full_label_display == false
|
|
30
33
|
@item_text = @item_name
|
|
34
|
+
text_width = metrics.width(@item_text)
|
|
35
|
+
else # no label
|
|
36
|
+
@item_text = nil
|
|
37
|
+
text_width = 0
|
|
31
38
|
end
|
|
32
|
-
text_width = metrics.width(@item_text)
|
|
33
39
|
@radius = radius.to_i
|
|
34
40
|
@diameter = @radius * 2
|
|
35
41
|
@text_height = @font.pointSize
|
|
@@ -85,18 +91,18 @@ module Cosmos
|
|
|
85
91
|
def paint_implementation(dc)
|
|
86
92
|
dc.setBrush(Cosmos.getBrush(@foreground))
|
|
87
93
|
dc.drawEllipse(0, 0, @diameter, @diameter)
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
94
|
+
if @item_text
|
|
95
|
+
dc.setBrush(Cosmos.getBrush(Cosmos::BLACK))
|
|
96
|
+
dc.drawText(@left_offset, @text_baseline, @item_text)
|
|
97
|
+
end
|
|
98
|
+
# Additional drawing for subclasses
|
|
92
99
|
additional_drawing(dc)
|
|
93
100
|
end
|
|
94
101
|
|
|
95
102
|
protected
|
|
96
103
|
|
|
97
|
-
def additional_drawing
|
|
104
|
+
def additional_drawing(dc)
|
|
98
105
|
# Do nothing
|
|
99
106
|
end
|
|
100
107
|
end
|
|
101
|
-
|
|
102
|
-
end # module Cosmos
|
|
108
|
+
end
|
|
@@ -11,9 +11,10 @@
|
|
|
11
11
|
require 'cosmos/tools/tlm_viewer/widgets/limits_widget'
|
|
12
12
|
|
|
13
13
|
module Cosmos
|
|
14
|
-
|
|
14
|
+
# Draw a column which consists of the red low, yellow low, green with potentially
|
|
15
|
+
# a blue operational limits inside it, yellow high, and red high. Then draw a
|
|
16
|
+
# horizontal black bar with a little black triangle at the current value location.
|
|
15
17
|
class LimitscolumnWidget < LimitsWidget
|
|
16
|
-
|
|
17
18
|
def initialize(parent_layout, target_name, packet_name, item_name, value_type = :CONVERTED, width = 30, height = 100)
|
|
18
19
|
super(parent_layout, target_name, packet_name, item_name, value_type, width, height)
|
|
19
20
|
end
|
|
@@ -26,7 +27,7 @@ module Cosmos
|
|
|
26
27
|
limits = get_limits()
|
|
27
28
|
return unless limits
|
|
28
29
|
|
|
29
|
-
widths = calculate_widths(limits, @bar_height)
|
|
30
|
+
limits, widths = calculate_widths(limits, @bar_height, @min_value, @max_value)
|
|
30
31
|
|
|
31
32
|
# Set starting points
|
|
32
33
|
x_pos = @x_pad
|
|
@@ -77,9 +78,23 @@ module Cosmos
|
|
|
77
78
|
# Draw line at current value
|
|
78
79
|
red_low = limits[0]
|
|
79
80
|
red_high = limits[3]
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
# Start with a diviser of 0.8 assuming we'll draw red limits
|
|
82
|
+
diviser = 0.8
|
|
83
|
+
# If there is a min or max value equal to the min or or max red limit
|
|
84
|
+
# it means we're not drawing red bar and the diviser increases
|
|
85
|
+
diviser += 0.1 if @min_value && limits[0] == @min_value
|
|
86
|
+
diviser += 0.1 if @max_value && limits[3] == @max_value
|
|
87
|
+
@bar_scale = (red_high - red_low) / diviser
|
|
88
|
+
if @min_value && @min_value >= red_low
|
|
89
|
+
@low_value = @min_value
|
|
90
|
+
else
|
|
91
|
+
@low_value = red_low - 0.1 * @bar_scale
|
|
92
|
+
end
|
|
93
|
+
if @max_value && @max_value <= red_high
|
|
94
|
+
@high_value = @max_value
|
|
95
|
+
else
|
|
96
|
+
@high_value = red_high + 0.1 * @bar_scale
|
|
97
|
+
end
|
|
83
98
|
|
|
84
99
|
if @value.is_a?(Float) && (@value.infinite? || @value.nan?)
|
|
85
100
|
if @value.infinite? == 1
|
|
@@ -112,5 +127,4 @@ module Cosmos
|
|
|
112
127
|
additional_drawing(dc)
|
|
113
128
|
end
|
|
114
129
|
end
|
|
115
|
-
|
|
116
|
-
end # module Cosmos
|
|
130
|
+
end
|
|
@@ -13,7 +13,7 @@ require 'cosmos/tools/tlm_viewer/widgets/widget'
|
|
|
13
13
|
require 'cosmos/gui/line_graph/line_graph'
|
|
14
14
|
|
|
15
15
|
module Cosmos
|
|
16
|
-
|
|
16
|
+
# Displays a graph of the given telemetry item
|
|
17
17
|
class LinegraphWidget < LineGraph
|
|
18
18
|
include Widget
|
|
19
19
|
|
|
@@ -59,5 +59,4 @@ module Cosmos
|
|
|
59
59
|
def get_tooltip_text
|
|
60
60
|
return nil
|
|
61
61
|
end
|
|
62
|
-
|
|
63
|
-
end # module Cosmos
|
|
62
|
+
end
|
|
@@ -12,7 +12,9 @@ require 'cosmos/tools/tlm_viewer/widgets/widget'
|
|
|
12
12
|
require 'cosmos/tools/tlm_viewer/widgets/layout_widget'
|
|
13
13
|
|
|
14
14
|
module Cosmos
|
|
15
|
-
|
|
15
|
+
# Layout widget which creates a grid of the specified number of columns.
|
|
16
|
+
# A new row is created as widgets are added to the grid and exceed the
|
|
17
|
+
# specified number of columns.
|
|
16
18
|
class MatrixbycolumnsWidget < Qt::GridLayout
|
|
17
19
|
include Widget
|
|
18
20
|
include LayoutWidget
|
|
@@ -54,5 +56,4 @@ module Cosmos
|
|
|
54
56
|
end
|
|
55
57
|
end
|
|
56
58
|
end
|
|
57
|
-
|
|
58
|
-
end # module Cosmos
|
|
59
|
+
end
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
require 'cosmos/tools/tlm_viewer/widgets/widget'
|
|
12
12
|
|
|
13
13
|
module Cosmos
|
|
14
|
-
|
|
15
14
|
# The MultiWidget module must be included after the Widget module by all widget
|
|
16
15
|
# classes that consist of multiple other COSMOS widgets. It overrides methods
|
|
17
16
|
# in the Widget module to support setting all the subwidgets that comprise
|
|
@@ -112,5 +111,4 @@ module Cosmos
|
|
|
112
111
|
end
|
|
113
112
|
end
|
|
114
113
|
end
|
|
115
|
-
|
|
116
|
-
end # module Cosmos
|
|
114
|
+
end
|
|
@@ -11,24 +11,29 @@
|
|
|
11
11
|
require 'cosmos/tools/tlm_viewer/widgets/widget'
|
|
12
12
|
|
|
13
13
|
module Cosmos
|
|
14
|
-
|
|
14
|
+
# Displays a progress bar based on the given telemetry item. The item should
|
|
15
|
+
# return a value between 0 and 100 which will be used to update the progress.
|
|
16
|
+
# You can also set a scale factor to multiply the telemetry item by before
|
|
17
|
+
# setting the progress.
|
|
15
18
|
class ProgressbarWidget < Qt::ProgressBar
|
|
16
19
|
include Widget
|
|
17
20
|
|
|
18
21
|
def initialize(parent_layout, target_name, packet_name, item_name, scale_factor = 1.0, width = 80, value_type = :CONVERTED)
|
|
19
22
|
super(target_name, packet_name, item_name, value_type)
|
|
20
23
|
@scale_factor = scale_factor.to_f
|
|
21
|
-
|
|
24
|
+
setFixedWidth(width.to_i)
|
|
22
25
|
parent_layout.addWidget(self) if parent_layout
|
|
23
26
|
end
|
|
24
27
|
|
|
25
28
|
def value=(value)
|
|
26
|
-
|
|
29
|
+
value = (value.to_f * @scale_factor).to_i
|
|
30
|
+
# Truncate to 100 because otherwise it will not display
|
|
31
|
+
value = 100 if value > 100
|
|
32
|
+
setValue(value)
|
|
27
33
|
end
|
|
28
34
|
|
|
29
35
|
def ProgressbarWidget.takes_value?
|
|
30
36
|
return true
|
|
31
37
|
end
|
|
32
38
|
end
|
|
33
|
-
|
|
34
|
-
end # module Cosmos
|
|
39
|
+
end
|
|
@@ -12,8 +12,12 @@ require 'cosmos'
|
|
|
12
12
|
require 'cosmos/tools/tlm_viewer/widgets/widget'
|
|
13
13
|
|
|
14
14
|
module Cosmos
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
# Create a radio button. Typically used as a NAMED_WIDGET which is then
|
|
16
|
+
# referenced by a BUTTON to perform an action. For example:
|
|
17
|
+
# NAMED_WIDGET ABORT RADIOBUTTON 'Abort' CHECKED
|
|
18
|
+
# NAMED_WIDGET CLEAR RADIOBUTTON 'Clear' UNCHECKED
|
|
19
|
+
# BUTTON 'Send' 'if get_named_widget("ABORT").checked? then cmd("INST ABORT") else cmd("INST CLEAR") end'
|
|
20
|
+
class RadiobuttonWidget < Qt::RadioButton
|
|
17
21
|
include Widget
|
|
18
22
|
|
|
19
23
|
def initialize(parent_layout, radiobutton_text, checked = 'UNCHECKED')
|
|
@@ -34,5 +38,4 @@ module Cosmos
|
|
|
34
38
|
self.isChecked()
|
|
35
39
|
end
|
|
36
40
|
end
|
|
37
|
-
|
|
38
|
-
end # module Cosmos
|
|
41
|
+
end
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
require 'cosmos/tools/tlm_viewer/widgets/limitsbar_widget'
|
|
12
12
|
|
|
13
13
|
module Cosmos
|
|
14
|
-
|
|
14
|
+
# Display a bar with a vertical current value indicator which moves based
|
|
15
|
+
# on the value of the given telemetry item
|
|
15
16
|
class RangebarWidget < LimitsbarWidget
|
|
16
|
-
|
|
17
|
-
def initialize (parent_layout, target_name, packet_name, item_name, low_value, high_value, value_type = :CONVERTED, width = 160, height = 25)
|
|
17
|
+
def initialize(parent_layout, target_name, packet_name, item_name, low_value, high_value, value_type = :CONVERTED, width = 160, height = 25)
|
|
18
18
|
super(parent_layout, target_name, packet_name, item_name, value_type, width, height)
|
|
19
19
|
@low_value = low_value.to_s.convert_to_value
|
|
20
20
|
@high_value = high_value.to_s.convert_to_value
|
|
@@ -59,7 +59,5 @@ module Cosmos
|
|
|
59
59
|
#Additional drawing for subclasses
|
|
60
60
|
additional_drawing(dc)
|
|
61
61
|
end
|
|
62
|
-
|
|
63
62
|
end
|
|
64
|
-
|
|
65
|
-
end # module Cosmos
|
|
63
|
+
end
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
require 'cosmos/tools/tlm_viewer/widgets/limitscolumn_widget'
|
|
12
12
|
|
|
13
13
|
module Cosmos
|
|
14
|
-
|
|
14
|
+
# Display a column with a horizontal current value indicator which moves based
|
|
15
|
+
# on the value of the given telemetry item
|
|
15
16
|
class RangecolumnWidget < LimitscolumnWidget
|
|
16
|
-
|
|
17
17
|
def initialize(parent_layout, target_name, packet_name, item_name, low_value, high_value, value_type = :CONVERTED, width = 30, height = 100)
|
|
18
18
|
super(parent_layout, target_name, packet_name, item_name, value_type, width, height)
|
|
19
19
|
@low_value = low_value.to_s.convert_to_value
|
|
@@ -59,7 +59,5 @@ module Cosmos
|
|
|
59
59
|
#Additional drawing for subclasses
|
|
60
60
|
additional_drawing(dc)
|
|
61
61
|
end
|
|
62
|
-
|
|
63
62
|
end
|
|
64
|
-
|
|
65
|
-
end # module Cosmos
|
|
63
|
+
end
|
|
@@ -12,7 +12,9 @@ require 'cosmos/tools/tlm_viewer/widgets/widget'
|
|
|
12
12
|
require 'cosmos/gui/utilities/screenshot'
|
|
13
13
|
|
|
14
14
|
module Cosmos
|
|
15
|
-
|
|
15
|
+
# Creates a button that takes a screenshot of the screen it is on.
|
|
16
|
+
# The output file location can be specified or by default it goes to
|
|
17
|
+
# the system LOGS directory (output/logs)
|
|
16
18
|
class ScreenshotbuttonWidget < Qt::PushButton
|
|
17
19
|
include Widget
|
|
18
20
|
|
|
@@ -30,5 +32,4 @@ module Cosmos
|
|
|
30
32
|
end
|
|
31
33
|
end
|
|
32
34
|
end
|
|
33
|
-
|
|
34
|
-
end # module Cosmos
|
|
35
|
+
end
|