openc3 5.15.1 → 5.15.2
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.
Potentially problematic release.
This version of openc3 might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/data/config/widgets.yaml +1 -1
- data/lib/openc3/accessors/json_accessor.rb +11 -3
- data/lib/openc3/io/posix_serial_driver.rb +20 -5
- data/lib/openc3/script/storage.rb +3 -4
- data/lib/openc3/script/web_socket_api.rb +10 -0
- data/lib/openc3/version.rb +5 -5
- data/templates/target/targets/TARGET/lib/target.py +2 -0
- data/templates/tool_angular/package.json +2 -2
- data/templates/tool_svelte/package.json +1 -1
- data/templates/tool_vue/package.json +2 -2
- data/templates/widget/package.json +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a39dab08bb9810376520e75a7bf3a6c63d30ad54b93566b82a849d780693a366
|
4
|
+
data.tar.gz: 65d282829dba0706cbe0e32603e51ad8ab3dfc0fdaf37d9bd400787bb7a1cb03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12bffefe104e90e159c16bcc54ab53745e86a97bfb762c7e0e25141d6bd3c91ad6bb8827017d915dfb459b2fc69ea7365c97e7fa22236abb16ff0d73d8d485d7
|
7
|
+
data.tar.gz: b2efa2780f97e2aa3392cc483534d949be4fb27032dbc3e52015ebfa89da08d234e5777c50dbfa09e477357d3b5ca67aba847f8f5d723676d2331da84e880f7f
|
data/data/config/widgets.yaml
CHANGED
@@ -1302,7 +1302,7 @@ Interactive Widgets:
|
|
1302
1302
|
|
1303
1303
|
Button code can get rather complex so remember to use string concatenation
|
1304
1304
|
to make things more readable. If you use `+` newlines are inserted automatically
|
1305
|
-
during string concatenation. If you use
|
1305
|
+
during string concatenation. If you use `\\` you'll need to separate lines with a
|
1306
1306
|
single semicolon `;`. COSMOS uses double semicolon `;;` to indicate lines should
|
1307
1307
|
be evaluated separately. Note that all OpenC3 commands (using api.cmd) must be
|
1308
1308
|
separated by `;;`.
|
@@ -18,8 +18,16 @@
|
|
18
18
|
|
19
19
|
require 'json'
|
20
20
|
require 'jsonpath'
|
21
|
+
require 'openc3/io/json_rpc'
|
21
22
|
require 'openc3/accessors/accessor'
|
22
23
|
|
24
|
+
# Monkey patch JsonPath to enable create_additions and allow_nan to support binary strings, and NaN, Infinity, -Infinity
|
25
|
+
class JsonPath
|
26
|
+
def self.process_object(obj_or_str, opts = {})
|
27
|
+
obj_or_str.is_a?(String) ? MultiJson.decode(obj_or_str, max_nesting: opts[:max_nesting], create_additions: true, allow_nan: true) : obj_or_str
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
23
31
|
module OpenC3
|
24
32
|
class JsonAccessor < Accessor
|
25
33
|
def self.read_item(item, buffer)
|
@@ -33,7 +41,7 @@ module OpenC3
|
|
33
41
|
|
34
42
|
# Convert to ruby objects
|
35
43
|
if String === buffer
|
36
|
-
decoded = JSON.parse(buffer, :allow_nan => true)
|
44
|
+
decoded = JSON.parse(buffer, :allow_nan => true, :create_additions => true)
|
37
45
|
else
|
38
46
|
decoded = buffer
|
39
47
|
end
|
@@ -43,7 +51,7 @@ module OpenC3
|
|
43
51
|
|
44
52
|
# Update buffer
|
45
53
|
if String === buffer
|
46
|
-
buffer.replace(JSON.generate(decoded, :allow_nan => true))
|
54
|
+
buffer.replace(JSON.generate(decoded.as_json, :allow_nan => true))
|
47
55
|
end
|
48
56
|
|
49
57
|
return value
|
@@ -52,7 +60,7 @@ module OpenC3
|
|
52
60
|
def self.read_items(items, buffer)
|
53
61
|
# Prevent JsonPath from decoding every call
|
54
62
|
if String === buffer
|
55
|
-
decoded = JSON.parse(buffer, :allow_nan => true)
|
63
|
+
decoded = JSON.parse(buffer, :allow_nan => true, :create_additions => true)
|
56
64
|
else
|
57
65
|
decoded = buffer
|
58
66
|
end
|
@@ -14,10 +14,10 @@
|
|
14
14
|
# GNU Affero General Public License for more details.
|
15
15
|
|
16
16
|
# Modified by OpenC3, Inc.
|
17
|
-
# All changes Copyright
|
17
|
+
# All changes Copyright 2024, OpenC3, Inc.
|
18
18
|
# All Rights Reserved
|
19
19
|
#
|
20
|
-
# This file may also be used under the terms of a commercial license
|
20
|
+
# This file may also be used under the terms of a commercial license
|
21
21
|
# if purchased from OpenC3, Inc.
|
22
22
|
|
23
23
|
require 'fcntl'
|
@@ -82,12 +82,17 @@ module OpenC3
|
|
82
82
|
tio.ospeed = baud_rate
|
83
83
|
@handle.tcflush(Termios::TCIOFLUSH)
|
84
84
|
@handle.tcsetattr(Termios::TCSANOW, tio)
|
85
|
+
|
86
|
+
@pipe_reader, @pipe_writer = IO.pipe
|
87
|
+
@readers = [@handle, @pipe_reader]
|
85
88
|
end
|
86
89
|
|
87
90
|
# (see SerialDriver#close)
|
88
91
|
def close
|
89
92
|
if @handle
|
90
93
|
# Close the serial Port
|
94
|
+
@pipe_writer.write('.')
|
95
|
+
@pipe_writer.close
|
91
96
|
@handle.close
|
92
97
|
@handle = nil
|
93
98
|
end
|
@@ -132,9 +137,19 @@ module OpenC3
|
|
132
137
|
begin
|
133
138
|
data = @handle.read_nonblock(65535)
|
134
139
|
rescue Errno::EAGAIN, Errno::EWOULDBLOCK
|
135
|
-
|
136
|
-
|
137
|
-
|
140
|
+
begin
|
141
|
+
read_ready, _ = IO.fast_select(@readers, nil, nil, @read_timeout)
|
142
|
+
rescue IOError
|
143
|
+
@pipe_reader.close unless @pipe_reader.closed?
|
144
|
+
return ""
|
145
|
+
end
|
146
|
+
if read_ready
|
147
|
+
if read_ready.include?(@pipe_reader)
|
148
|
+
@pipe_reader.close unless @pipe_reader.closed?
|
149
|
+
return ""
|
150
|
+
else
|
151
|
+
retry
|
152
|
+
end
|
138
153
|
else
|
139
154
|
raise Timeout::Error, "Read Timeout"
|
140
155
|
end
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# GNU Affero General Public License for more details.
|
15
15
|
|
16
16
|
# Modified by OpenC3, Inc.
|
17
|
-
# All changes Copyright
|
17
|
+
# All changes Copyright 2024, OpenC3, Inc.
|
18
18
|
# All Rights Reserved
|
19
19
|
#
|
20
20
|
# This file may also be used under the terms of a commercial license
|
@@ -175,9 +175,8 @@ module OpenC3
|
|
175
175
|
if $openc3_in_cluster
|
176
176
|
case ENV['OPENC3_CLOUD']
|
177
177
|
when 'local'
|
178
|
-
bucket_url = ENV["OPENC3_BUCKET_URL"] || "openc3-minio:9000"
|
179
|
-
#
|
180
|
-
URI.parse("http://#{bucket_url}#{url}")
|
178
|
+
bucket_url = ENV["OPENC3_BUCKET_URL"] || "http://openc3-minio:9000"
|
179
|
+
URI.parse("#{bucket_url}#{url}")
|
181
180
|
when 'aws'
|
182
181
|
URI.parse("https://s3.#{ENV['AWS_REGION']}.amazonaws.com" + url)
|
183
182
|
when 'gcp'
|
@@ -215,6 +215,16 @@ module OpenC3
|
|
215
215
|
end
|
216
216
|
end
|
217
217
|
|
218
|
+
# All Scripts WebSocket
|
219
|
+
class AllScriptsWebSocketApi < ScriptWebSocketApi
|
220
|
+
def initialize(url: nil, write_timeout: 10.0, read_timeout: 10.0, connect_timeout: 5.0, authentication: nil, scope: $openc3_scope)
|
221
|
+
@identifier = {
|
222
|
+
channel: "AllScriptsChannel",
|
223
|
+
}
|
224
|
+
super(url: url, write_timeout: write_timeout, read_timeout: read_timeout, connect_timeout: connect_timeout, authentication: authentication, scope: scope)
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
218
228
|
# Log Messages WebSocket
|
219
229
|
class MessagesWebSocketApi < CmdTlmWebSocketApi
|
220
230
|
def initialize(history_count: 0, start_time: nil, end_time: nil, level: nil, types: nil, url: nil, write_timeout: 10.0, read_timeout: 10.0, connect_timeout: 5.0, authentication: nil, scope: $openc3_scope)
|
data/lib/openc3/version.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# encoding: ascii-8bit
|
2
2
|
|
3
|
-
OPENC3_VERSION = '5.15.
|
3
|
+
OPENC3_VERSION = '5.15.2'
|
4
4
|
module OpenC3
|
5
5
|
module Version
|
6
6
|
MAJOR = '5'
|
7
7
|
MINOR = '15'
|
8
|
-
PATCH = '
|
8
|
+
PATCH = '2'
|
9
9
|
OTHER = ''
|
10
|
-
BUILD = '
|
10
|
+
BUILD = '460e13eadf313640ad089597bee233ecdafd2ffa'
|
11
11
|
end
|
12
|
-
VERSION = '5.15.
|
13
|
-
GEM_VERSION = '5.15.
|
12
|
+
VERSION = '5.15.2'
|
13
|
+
GEM_VERSION = '5.15.2'
|
14
14
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "<%= tool_name %>",
|
3
|
-
"version": "5.15.
|
3
|
+
"version": "5.15.2",
|
4
4
|
"scripts": {
|
5
5
|
"ng": "ng",
|
6
6
|
"start": "ng serve",
|
@@ -12,7 +12,7 @@
|
|
12
12
|
},
|
13
13
|
"private": true,
|
14
14
|
"dependencies": {
|
15
|
-
"@openc3/tool-common": "5.15.
|
15
|
+
"@openc3/tool-common": "5.15.2",
|
16
16
|
"@angular/animations": "^17.0.8",
|
17
17
|
"@angular/cdk": "^17.0.4",
|
18
18
|
"@angular/common": "^17.0.8",
|
@@ -11,7 +11,7 @@
|
|
11
11
|
"smui-theme": "smui-theme compile build/smui.css -i src/theme"
|
12
12
|
},
|
13
13
|
"dependencies": {
|
14
|
-
"@openc3/tool-common": "5.15.
|
14
|
+
"@openc3/tool-common": "5.15.2",
|
15
15
|
"@astrouxds/astro-web-components": "7.20.0",
|
16
16
|
"@smui/button": "^7.0.0-beta.16",
|
17
17
|
"@smui/card": "^7.0.0-beta.16",
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "<%= tool_name %>",
|
3
|
-
"version": "5.15.
|
3
|
+
"version": "5.15.2",
|
4
4
|
"private": true,
|
5
5
|
"scripts": {
|
6
6
|
"serve": "vue-cli-service serve",
|
@@ -11,7 +11,7 @@
|
|
11
11
|
"test:components": "vue-cli-service test:components"
|
12
12
|
},
|
13
13
|
"dependencies": {
|
14
|
-
"@openc3/tool-common": "5.15.
|
14
|
+
"@openc3/tool-common": "5.15.2",
|
15
15
|
"@astrouxds/astro-web-components": "7.20.0",
|
16
16
|
"axios": "1.6.5",
|
17
17
|
"date-fns": "2.30.0",
|
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "widget",
|
3
|
-
"version": "5.15.
|
3
|
+
"version": "5.15.2",
|
4
4
|
"private": true,
|
5
5
|
"scripts": {
|
6
6
|
"build": "vue-cli-service build --target lib --dest tools/widgets/<%= widget_name %> --formats umd-min <%= widget_path %> --name <%= widget_name %>"
|
7
7
|
},
|
8
8
|
"dependencies": {
|
9
|
-
"@openc3/tool-common": "5.15.
|
9
|
+
"@openc3/tool-common": "5.15.2",
|
10
10
|
"@astrouxds/astro-web-components": "7.20.0",
|
11
11
|
"vue": "2.7.16",
|
12
12
|
"vuetify": "2.7.1"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openc3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.15.
|
4
|
+
version: 5.15.2
|
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: 2024-
|
12
|
+
date: 2024-04-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|