cosmos 3.7.1 → 3.8.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.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/Manifest.txt +1 -0
  3. data/bin/xtce_converter +83 -0
  4. data/cosmos.gemspec +2 -0
  5. data/data/crc.txt +279 -279
  6. data/demo/config/data/crc.txt +171 -171
  7. data/demo/config/targets/INST/cmd_tlm/inst_tlm.txt +1 -1
  8. data/demo/config/targets/INST/lib/sim_inst.rb +17 -1
  9. data/demo/config/targets/INST/screens/hs.txt +4 -1
  10. data/demo/config/targets/INST/screens/limits.txt +13 -13
  11. data/install/config/data/crc.txt +113 -113
  12. data/lib/cosmos/conversions/conversion.rb +6 -0
  13. data/lib/cosmos/conversions/generic_conversion.rb +12 -0
  14. data/lib/cosmos/conversions/new_packet_log_conversion.rb +6 -0
  15. data/lib/cosmos/conversions/polynomial_conversion.rb +6 -0
  16. data/lib/cosmos/conversions/processor_conversion.rb +10 -0
  17. data/lib/cosmos/conversions/segmented_polynomial_conversion.rb +10 -0
  18. data/lib/cosmos/conversions/unix_time_conversion.rb +6 -0
  19. data/lib/cosmos/core_ext/string.rb +18 -5
  20. data/lib/cosmos/gui/line_graph/lines.rb +13 -12
  21. data/lib/cosmos/packets/limits_response.rb +4 -0
  22. data/lib/cosmos/packets/packet.rb +59 -8
  23. data/lib/cosmos/packets/packet_config.rb +679 -6
  24. data/lib/cosmos/packets/packet_item.rb +230 -0
  25. data/lib/cosmos/packets/parsers/packet_parser.rb +30 -22
  26. data/lib/cosmos/processors/new_packet_log_processor.rb +5 -0
  27. data/lib/cosmos/processors/processor.rb +5 -0
  28. data/lib/cosmos/processors/statistics_processor.rb +5 -0
  29. data/lib/cosmos/processors/watermark_processor.rb +5 -0
  30. data/lib/cosmos/script/extract.rb +1 -1
  31. data/lib/cosmos/tools/packet_viewer/packet_viewer.rb +7 -2
  32. data/lib/cosmos/tools/tlm_grapher/data_objects/housekeeping_data_object.rb +3 -1
  33. data/lib/cosmos/tools/tlm_grapher/data_objects/xy_data_object.rb +3 -1
  34. data/lib/cosmos/tools/tlm_viewer/widgets/limits_widget.rb +10 -0
  35. data/lib/cosmos/tools/tlm_viewer/widgets/limitsbar_widget.rb +14 -6
  36. data/lib/cosmos/tools/tlm_viewer/widgets/limitscolumn_widget.rb +14 -6
  37. data/lib/cosmos/tools/tlm_viewer/widgets/rangebar_widget.rb +14 -6
  38. data/lib/cosmos/tools/tlm_viewer/widgets/rangecolumn_widget.rb +14 -6
  39. data/lib/cosmos/utilities/simulated_target.rb +1 -0
  40. data/lib/cosmos/version.rb +5 -5
  41. metadata +18 -2
@@ -81,12 +81,20 @@ module Cosmos
81
81
  @low_value = red_low - 0.1 * @bar_scale
82
82
  @high_value = red_high + 0.1 * @bar_scale
83
83
 
84
- @line_pos = @height - (@y_pad + (@value - @low_value) / @bar_scale * @bar_height).to_i
85
- if @line_pos < @y_pad
86
- @line_pos = @y_pad
87
- end
88
- if @line_pos > @y_pad + @bar_height
89
- @line_pos = @bar_height + @y_pad
84
+ if @value.is_a?(Float) && (@value.infinite? || @value.nan?)
85
+ if @value.infinite? == 1
86
+ @line_pos = @bar_width + @y_pad
87
+ else
88
+ @line_pos = @y_pad
89
+ end
90
+ else
91
+ @line_pos = @height - (@y_pad + (@value - @low_value) / @bar_scale * @bar_height).to_i
92
+ if @line_pos < @y_pad
93
+ @line_pos = @y_pad
94
+ end
95
+ if @line_pos > @y_pad + @bar_height
96
+ @line_pos = @bar_height + @y_pad
97
+ end
90
98
  end
91
99
 
92
100
  dc.addLineColor(@x_pad - 3, @line_pos, @x_pad + @bar_width + 3, @line_pos)
@@ -27,12 +27,20 @@ module Cosmos
27
27
  # Draw line at current value
28
28
  @bar_scale = @high_value - @low_value
29
29
 
30
- @line_pos = (@x_pad + (@value - @low_value) / @bar_scale * @bar_width).to_i
31
- if @line_pos < @x_pad
32
- @line_pos = @x_pad
33
- end
34
- if @line_pos > @x_pad + @bar_width
35
- @line_pos = @bar_width + @x_pad
30
+ if @value.is_a?(Float) && (@value.infinite? || @value.nan?)
31
+ if @value.infinite? == 1
32
+ @line_pos = @bar_width + @x_pad
33
+ else
34
+ @line_pos = @x_pad
35
+ end
36
+ else
37
+ @line_pos = (@x_pad + (@value - @low_value) / @bar_scale * @bar_width).to_i
38
+ if @line_pos < @x_pad
39
+ @line_pos = @x_pad
40
+ end
41
+ if @line_pos > @x_pad + @bar_width
42
+ @line_pos = @bar_width + @x_pad
43
+ end
36
44
  end
37
45
 
38
46
  dc.addLineColor(@line_pos, @y_pad - 3, @line_pos, @y_pad + @bar_height + 3)
@@ -27,12 +27,20 @@ module Cosmos
27
27
  # Draw line at current value
28
28
  @bar_scale = @high_value - @low_value
29
29
 
30
- @line_pos = @height - (@y_pad + (@value - @low_value) / @bar_scale * @bar_height).to_i
31
- if @line_pos < @y_pad
32
- @line_pos = @y_pad
33
- end
34
- if @line_pos > @y_pad + @bar_height
35
- @line_pos = @bar_height + @y_pad
30
+ if @value.is_a?(Float) && (@value.infinite? || @value.nan?)
31
+ if @value.infinite? == 1
32
+ @line_pos = @bar_width + @y_pad
33
+ else
34
+ @line_pos = @y_pad
35
+ end
36
+ else
37
+ @line_pos = @height - (@y_pad + (@value - @low_value) / @bar_scale * @bar_height).to_i
38
+ if @line_pos < @y_pad
39
+ @line_pos = @y_pad
40
+ end
41
+ if @line_pos > @y_pad + @bar_height
42
+ @line_pos = @bar_height + @y_pad
43
+ end
36
44
  end
37
45
 
38
46
  dc.addLineColor(@x_pad - 3, @line_pos, @x_pad + @bar_width + 3, @line_pos)
@@ -93,6 +93,7 @@ module Cosmos
93
93
  @current_cycle_delta[packet_name][item_name] = -current_delta
94
94
  end
95
95
  packet.write(item_name, updated_value)
96
+ updated_value
96
97
  end
97
98
  end
98
99
 
@@ -1,12 +1,12 @@
1
1
  # encoding: ascii-8bit
2
2
 
3
- COSMOS_VERSION = '3.7.1'
3
+ COSMOS_VERSION = '3.8.0'
4
4
  module Cosmos
5
5
  module Version
6
6
  MAJOR = '3'
7
- MINOR = '7'
8
- PATCH = '1'
9
- BUILD = 'efe6e6f49c53a6f9ac1d2069eeee50df2eb9cb4d'
7
+ MINOR = '8'
8
+ PATCH = '0'
9
+ BUILD = '2bed164a724153c0accb6392928da087b2120ade'
10
10
  end
11
- VERSION = '3.7.1'
11
+ VERSION = '3.8.0'
12
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cosmos
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.1
4
+ version: 3.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Melton
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-12-29 00:00:00.000000000 Z
12
+ date: 2016-02-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -221,6 +221,20 @@ dependencies:
221
221
  - - ">="
222
222
  - !ruby/object:Gem::Version
223
223
  version: 4.8.6.2
224
+ - !ruby/object:Gem::Dependency
225
+ name: nokogiri
226
+ requirement: !ruby/object:Gem::Requirement
227
+ requirements:
228
+ - - "~>"
229
+ - !ruby/object:Gem::Version
230
+ version: '1.6'
231
+ type: :runtime
232
+ prerelease: false
233
+ version_requirements: !ruby/object:Gem::Requirement
234
+ requirements:
235
+ - - "~>"
236
+ - !ruby/object:Gem::Version
237
+ version: '1.6'
224
238
  - !ruby/object:Gem::Dependency
225
239
  name: rspec
226
240
  requirement: !ruby/object:Gem::Requirement
@@ -416,6 +430,7 @@ executables:
416
430
  - cosmos
417
431
  - rubysloc
418
432
  - cstol_converter
433
+ - xtce_converter
419
434
  extensions:
420
435
  - ext/cosmos/ext/array/extconf.rb
421
436
  - ext/cosmos/ext/buffered_file/extconf.rb
@@ -629,6 +644,7 @@ files:
629
644
  - bin/mgwhelp-x64.dll
630
645
  - bin/mgwhelp.dll
631
646
  - bin/rubysloc
647
+ - bin/xtce_converter
632
648
  - cosmos.gemspec
633
649
  - data/COSMOS_64x64.bmp
634
650
  - data/COSMOS_64x64.ico