Skip to content

Commit

Permalink
releases
Browse files Browse the repository at this point in the history
  • Loading branch information
cfry committed Oct 22, 2022
1 parent 11b59cb commit 7b67955
Show file tree
Hide file tree
Showing 15 changed files with 206 additions and 100 deletions.
3 changes: 3 additions & 0 deletions HCA/HCA_ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ var HCA = class HCA {
insert_html_into_doc_pane(html, "User Guide", "beforeend")
open_doc(hca_ui_doc_id)
}
const ctx = HCA_canvas_id.getContext("2d");
ctx.fillStyle = "rgb(200, 0, 0)";
ctx.fillRect(10, 10, 50, 50);
}

static clear(){
Expand Down
12 changes: 6 additions & 6 deletions HCA/ipg_to_json.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ globalThis.ipg_to_json = class ipg_to_json{
let section = null
for(let line_index = 0; line_index < lines.length; line_index++){
let line = lines[line_index]
console.log("line index: " + line_index + ":" + line)
//console.log("line index: " + line_index + ":" + line)
//initial meta-data
if(line.startsWith("VIVA ")) {
let split_line = line.split(" ")
Expand All @@ -58,7 +58,7 @@ globalThis.ipg_to_json = class ipg_to_json{
}
else if(line.startsWith("DataSet ")) {
if(!result.datasets) {
console.log("DATASETS")
//console.log("DATASETS")
result.datasets = {}
}
let dataset_obj = this.parse_dataset(line)
Expand All @@ -84,7 +84,7 @@ globalThis.ipg_to_json = class ipg_to_json{

//Behavior Topology (net_list)
else if (line.startsWith(" //_ Behavior Topology")){
console.log("NETLIST")
//console.log("NETLIST")
section = "netList"
top_level_obj.netList = []
}
Expand Down Expand Up @@ -234,7 +234,7 @@ globalThis.ipg_to_json = class ipg_to_json{
}
let outputs_str = before_comment.substring(outputs_start_pos + 1, outputs_end_pos).trim()
*/
console.log("grabbing outputs: ")
//console.log("grabbing outputs: ")
let out_arr_and_end = this.grab_io(before_comment, space_after_Object_pos + 1) //this.io_string_to_obj_array(outputs_str)
out_array_result = out_arr_and_end[0]
outputs_end_pos = out_arr_and_end[1]
Expand Down Expand Up @@ -264,7 +264,7 @@ globalThis.ipg_to_json = class ipg_to_json{
let [name, name_end_pos] = this.grab_name(before_comment, name_start_pos) //before_comment.substring(name_start_pos, name_end_pos).trim()
//if(name.startsWith('"')) { name = name.substring(1, name.length - 1) } //cut off double quotes in name that are *sometimes* present
let [type, name_ext] = name.split(":") //name_ext is included in name, we don't use it separately
console.log("objectName: " + name)
//console.log("objectName: " + name)
new_obj.objectName = name
new_obj.objectType = type //the part of the name that's before the colon

Expand All @@ -286,7 +286,7 @@ globalThis.ipg_to_json = class ipg_to_json{
//will be name, type, inputs, outputs, x, y, font ...
//parse comment
if(comment) { //only happens for sub_objects
console.log("grabbing comments: " + comment)
//console.log("grabbing comments: " + comment)
if(comment.startsWith("_GUI ")){
let comment_start = 5
comment = comment.substring(comment_start)
Expand Down
14 changes: 12 additions & 2 deletions core/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
global.dde_version = "3.8.9" //require("../package.json").version
global.dde_release_date = "Sep 30, 2022" //require("../package.json").release_date
global.dde_version = "3.8.10" //require("../package.json").version
global.dde_release_date = "Oct 22, 2022" //require("../package.json").release_date

console.log("dde_version: " + global.dde_version + " dde_release_date: " + global.dde_release_date +
"\nRead electron_dde/core/job_engine_doc.txt for how to use the Job Engine.\n")
Expand Down Expand Up @@ -118,6 +118,10 @@ function run_shell_cmd_default_cb (error, stdout, stderr){
function run_shell_cmd(cmd_string, options={}, cb=run_shell_cmd_default_cb){
exec(cmd_string, options, cb)
}
var child_process = require("child_process")
var WebSocket = require('ws')

var Socket = require("./socket.js")

var {adjust_path_to_os, append_to_file,
choose_file, choose_save_file, choose_file_and_get_content, choose_folder,
Expand Down Expand Up @@ -176,6 +180,9 @@ var {Messaging, MessStat} = require("./messaging.js")
var {Py} = require("./py.js")

// see also je_and_browser_code.js for global vars.
global.child_process = child_process
global.WebSocket = WebSocket
global.Socket = Socket
global.keep_alive_value = false
global.Brain = Brain
global.Dexter = Dexter
Expand Down Expand Up @@ -238,7 +245,10 @@ global.persistent_get = persistent_get
global.persistent_remove = persistent_remove
global.persistent_save = persistent_save
global.read_file = read_file
global.read_file_async = read_file_async
global.write_file = write_file
global.write_file_async = read_file_async



global.close_readline = close_readline
Expand Down
6 changes: 3 additions & 3 deletions core/je_and_browser_code.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function out(val="", color="black", temp=false, code=null){
}
if(window.platform == "node") { //console.log(val)
let out_obj = {kind: "out_call", val: text, color: color, temp: temp, code: code} //code isn't actually used in the browser
write_to_stdout("<for_server>" + JSON.stringify(out_obj) + "</for_server>")
write_to_stdout("<for_server>" + JSON.stringify(out_obj) + "</for_server>\n")
return val
}

Expand Down Expand Up @@ -1010,7 +1010,7 @@ SW.window_index = null // The window_index of the last show_window made, or null
function selector_set_in_ui(path_string, value=null){
if(window.platform == "node") { //console.log(val)
let obj = {kind: "selector_set_in_ui_call", path_string: path_string, value: value}
write_to_stdout("<for_server>" + JSON.stringify(obj) + "</for_server>")
write_to_stdout("<for_server>" + JSON.stringify(obj) + "</for_server>\n")
}
else {
if(value === -0) { value = 0 } //in some weird raoujnding situations, we get a negative zero.
Expand Down Expand Up @@ -1100,7 +1100,7 @@ function selector_set_in_ui(path_string, value=null){
function append_in_ui(path_string, new_html){
if(window.platform == "node") { //console.log(val)
let obj = {kind: "append_in_ui_call", path_string: path_string, new_html: new_html}
write_to_stdout("<for_server>" + JSON.stringify(obj) + "</for_server>")
write_to_stdout("<for_server>" + JSON.stringify(obj) + "</for_server>\n")
}
else {
let elt = value_of_path(path_string)
Expand Down
2 changes: 1 addition & 1 deletion core/job.js
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ class Job{
}
else { //job engine
let data = {kind: "show_job_button", job_name: this.name, status_code: this.status_code, button_color: bg_color, button_tooltip: tooltip}
write_to_stdout("<for_server>" + JSON.stringify(data) + "</for_server>")
write_to_stdout("<for_server>" + JSON.stringify(data) + "</for_server>\n")
}
}
//end of jobs buttons
Expand Down
2 changes: 1 addition & 1 deletion core/out.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ function show_window({content = `<input type="submit" value="Done"/>`,
}
else {
//onsole.log("bottom of show_window writing to stdout")
write_to_stdout("<for_server>" + JSON.stringify(props) + "</for_server>")
write_to_stdout("<for_server>" + JSON.stringify(props) + "</for_server>\n")
}
return SW.window_index
}
Expand Down
16 changes: 12 additions & 4 deletions core/robot.js
Original file line number Diff line number Diff line change
Expand Up @@ -1766,8 +1766,10 @@ Dexter.empty_instruction_queue_immediately = function(){
}
Dexter.prototype.empty_instruction_queue_immediately = function(...args){ args.push(this); return Dexter.empty_instruction_queue_immediately(...args) }

Dexter.empty_instruction_queue = function() { return make_ins("F") }
Dexter.prototype.empty_instruction_queue = function(...args){ args.push(this); return Dexter.empty_instruction_queue(...args) }
Dexter.empty_instruction_queue = function(...args) {
return make_ins("F", ...args)
}
Dexter.prototype.empty_instruction_queue = function(){ return Dexter.empty_instruction_queue(this) }

Dexter.find_index = function(...args){ return make_ins("n", ...args) }
Dexter.prototype.find_index = function(...args){ args.push(this); return Dexter.find_index(...args) }
Expand Down Expand Up @@ -2575,9 +2577,15 @@ Dexter.prototype.set_link_lengths = function(job_to_start_when_done = null) {
}
else if (job_to_start_when_done.get_dexter_defaults) {
if (sim_actual !== true) { //ie "real"
if (node_server_supports_editor(this)) {
if (globalThis.platform == "node") {
//just get the file.
this.set_link_lengths_using_node_server(job_to_start_when_done)

}
else if (node_server_supports_editor(this)) {
this.set_link_lengths_using_node_server(job_to_start_when_done)
} else {
}
else {
job_to_start_when_done.stop_for_reason("errored_from_dexter_connect",
"While attempting to set_link_lengths, " +
" can't connect to Dexter." + this.name)
Expand Down
5 changes: 4 additions & 1 deletion core/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ var Socket = class Socket{
"\n failed after 2 seconds.")
}
}, 2000)
net_soc_inst.connect(rob.port, rob.ip_address)
let ip_addr = rob.ip_address
if (ip_addr == "localhost") ip_addr = "127.0.0.1" // net.connect wants a number as a string
console.log("Socket.init trying to connect to port:"+rob.port+" ip:"+ip_addr)
net_soc_inst.connect(rob.port, ip_addr)
} //ending the case where we need to make a new net_soc_inst

/*out(job_instance.name + "Socket.init before connect, net_soc_inst.readyState: " + net_soc_inst.readyState)
Expand Down
5 changes: 3 additions & 2 deletions core/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,9 @@ function read_file_async_from_dexter_using_job(dex_instance, path, callback){
let colon_pos = path.indexOf(":")
let dex_file_path = path.substring(colon_pos + 1)
new Job({name: "dex_read_file",
robot: dex_instance,
robot: new Brain({name: "b1"}),
do_list: [
Dexter.read_file(dex_file_path, "file_content"),
dex_instance.read_file(dex_file_path, "file_content"),
function(){
let cont = this.user_data.file_content
if(typeof(cont) == "string"){
Expand Down Expand Up @@ -1291,6 +1291,7 @@ var app = require('electron').remote; //in the electron book, "app" is sp
var {Robot, Brain, Dexter, Human, Serial} = require("./robot.js")
var {shouldnt, starts_with_one_of, replace_substrings} = require("./utils")
var Job = require("./job.js") //because loading a file with new Job in it needs this.
var {value_of_path} = require('./utils.js');



Expand Down
4 changes: 2 additions & 2 deletions doc/guide.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

<details class="doc_details"><summary>About</summary>
This is <a href="http://hdrobotic.com/" target="_blank">Dexter</a> Development Environment<br/>
version: <span id="dde_version_id">3.8.8</span><br/>
released: <span id="dde_release_date_id">Sep 30, 2022</span>
version: <span id="dde_version_id">3.8.10</span><br/>
released: <span id="dde_release_date_id">Oct 22, 2022</span>
<p></p>
DDE helps you create, debug, and send software to a Dexter robot.
You can use any JavaScript augmented with DDE-specific functions to help find out about,
Expand Down
1 change: 0 additions & 1 deletion doc/known_issues.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
to turn off virus protection, or click right on the
<code>dexter_dev_env</code> file to launch it.
</li>
<li>Linux release poorly tested.</li>
<li>Dexter.run_gcode needs many extensions.</li>
</ul>
</div>
21 changes: 20 additions & 1 deletion doc/release_notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@
}
.doc_details summary { font-weight: 600; }
</style>
<details class="doc_details"><summary>v 3.8.10, Oct 22, 2022</summary>
Highlights: Job Engine Improvements, Dexter UI tutorial Improvements.
<ul>
<li>The Job Engine now has global variables:
<ul><li><code>read_file_async</code></li>
<li><code>write_file_async</code></li>
<li><code>Socket</code></li>
<li><code>child_process</code></li>
<li><code>WebSocket</code></li>
</ul>
</li>
<li>Additional fixes for Job Engine
<li>In Dexter User Interface dialog, clicking the Job button now inserts
new job source code WITHOUT the <code>keep_history</code> and
<code>show_instructions</code> params.</li>
<li>Numerous improvements to the Dexter UI tutorial.</li>
<li><code>Dexter.dexter0.empty_instruction_queue</code> fixed.</li>
</ul>
</details>

<details class="doc_details"><summary>v 3.8.9, Sep 30, 2022</summary>
Highlights: Bug fixes.
Expand All @@ -14,7 +33,7 @@
causing problems.</li>
<li>robot_status.js now properly usesDexter.J1_MEASURED_ANGLE_G1 instead of 10.
This does not change functionality.</li>
<li>Inspector: 4 "extra info" infinite loop bugs fixed.</li>>
<li>Inspector: 4 "extra info" infinite loop bugs fixed.</li>
<li>Fixed bug in core/index.js for the folder of the require statement that loads dexter_defaults.js</li>
<li>Fixed bug in storage.js of the default value for outerWidth and outerHeight.</li>
</ul>
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "dexter_dev_env",
"productName": "dexter_dev_env",
"version": "3.8.9",
"release_date": "Sep 30, 2022",
"version": "3.8.10",
"release_date": "Oct 22, 2022",
"description": "Dexter Development Environment for programming the Dexter robot.",
"author": "Fry",
"license": "GPL-3.0",
Expand Down
Loading

0 comments on commit 7b67955

Please sign in to comment.