-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace Webpack with Vite #1728
Changes from 30 commits
0cfb18b
2783eab
783c2e4
f57e0a2
9b399f6
5be3a76
9ca6513
63dc5a1
7a22ffa
9e432b7
88d8ca5
19ba780
f389120
95b1e1b
8cd2e4f
1a60377
b96a7f8
d4dddaf
f545a6c
703b705
f8823a0
1c8a3c4
9edee64
d379d5b
6f4e56b
6fd3a0c
9941b5f
8b00a5d
eb54aa8
66af742
bdfeda3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Copyright 2024 OpenC3, Inc. | ||
# All Rights Reserved. | ||
# | ||
# This program is free software; you can modify and/or redistribute it | ||
# under the terms of the GNU Affero General Public License | ||
# as published by the Free Software Foundation; version 3 with | ||
# attribution addendums as found in the LICENSE.txt | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
# | ||
# This file may also be used under the terms of a commercial license | ||
# if purchased from OpenC3, Inc. | ||
|
||
import os | ||
|
||
os.environ["OPENC3_API_SCHEMA"] = "http" | ||
os.environ["OPENC3_API_HOSTNAME"] = "127.0.0.1" | ||
os.environ["OPENC3_API_PORT"] = "2900" | ||
os.environ["OPENC3_SCRIPT_API_SCHEMA"] = "http" | ||
os.environ["OPENC3_SCRIPT_API_HOSTNAME"] = "127.0.0.1" | ||
os.environ["OPENC3_SCRIPT_API_PORT"] = "2900" | ||
# os.environ["OPENC3_API_USER"] = "admin" # Only set for Enterprise | ||
os.environ["OPENC3_API_PASSWORD"] = "password" | ||
os.environ["OPENC3_NO_STORE"] = "1" | ||
# os.environ["OPENC3_KEYCLOAK_REALM"] = "openc3" # Only set for Enterprise | ||
# os.environ["OPENC3_KEYCLOAK_URL"] = "http://127.0.0.1:2900/auth" # Only set for Enterprise | ||
|
||
from openc3.utilities.string import formatted | ||
from openc3.script import * | ||
|
||
print(get_target_names()) | ||
|
||
print(tlm("INST ADCS POSX")) | ||
|
||
print(cmd("INST ABORT")) | ||
|
||
put_target_file("INST/test.txt", "this is a string test") | ||
file = get_target_file("INST/test.txt") | ||
print(file.read()) | ||
file.close() | ||
delete_target_file("INST/test.txt") | ||
|
||
with tempfile.NamedTemporaryFile(mode="w+t", suffix=".txt") as save_file: | ||
save_file.write("this is a Io test") | ||
save_file.seek(0) | ||
put_target_file("INST/test.txt", save_file) | ||
file = get_target_file("INST/test.txt") | ||
print(file.read()) | ||
file.close() | ||
delete_target_file("INST/test.txt") | ||
|
||
put_target_file("INST/test.bin", "\x00\x01\x02\x03\xFF\xEE\xDD\xCC".encode()) | ||
file = get_target_file("INST/test.bin") | ||
print(formatted(file.read())) | ||
file.close() | ||
delete_target_file("INST/test.bin") |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,7 +52,7 @@ GEMS="$SCRIPT_DIR/../../../openc3-cosmos-init/plugins/gems/" | |
OPENC3_RELEASE_VERSION=5.21.0-beta0 | ||
|
||
mkdir -p ${GEMS} | ||
cd ${PLUGINS}openc3-tool-base && yarn install && yarn run build && rake build VERSION=${OPENC3_RELEASE_VERSION} && mv *.gem ${GEMS} | ||
cd ${PLUGINS}packages/openc3-tool-base && yarn run build && rake build VERSION=${OPENC3_RELEASE_VERSION} && mv *.gem ${GEMS} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are we planning on deleting this hostinstall example? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought you already did that? |
||
cd ${PLUGINS}packages/openc3-cosmos-tool-admin && yarn run build && rake build VERSION=${OPENC3_RELEASE_VERSION} && mv *.gem ${GEMS} | ||
cd ${PLUGINS}packages/openc3-cosmos-tool-cmdsender && yarn run build && rake build VERSION=${OPENC3_RELEASE_VERSION} && mv *.gem ${GEMS} | ||
cd ${PLUGINS}packages/openc3-cosmos-tool-cmdtlmserver && yarn run build && rake build VERSION=${OPENC3_RELEASE_VERSION} && mv *.gem ${GEMS} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -215,9 +215,13 @@ def build_cmd_snippet(packet, target_info) | |
params = filtered_items.each_with_index.map do |item, index| | ||
if item['data_type'] == 'BLOCK' | ||
# Unpack binary data to uppercase hex string | ||
default = "0x#{item['default'].unpack('H*').first.upcase}" | ||
if item['default'] and String === item['default'] | ||
default = "0x#{item['default'].unpack('H*').first.upcase}" | ||
else | ||
default = "''" | ||
end | ||
elsif item['data_type'] == 'STRING' | ||
default = "'#{item['default']}'" || '' | ||
default = "'#{item['default']}'" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was this to address a specific issue with BLOCK vs STRING? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That or never did anything so I removed it. |
||
else | ||
default = item['default'] || 0 | ||
end | ||
|
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes the build faster?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. See the Docusaurus 3.6 release notes.