Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
cfry committed Apr 24, 2021
1 parent b87582d commit 81a2224
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 18 deletions.
4 changes: 2 additions & 2 deletions core/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
global.dde_version = "3.7.11" //require("../package.json").version
global.dde_release_date = "Apr 20, 2021" //require("../package.json").release_date
global.dde_version = "3.7.12" //require("../package.json").version
global.dde_release_date = "Apr 23, 2021" //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
15 changes: 14 additions & 1 deletion core/serial.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ module.exports.serial_port_init = serial_port_init
var serial_port_path_to_info_map = {}
module.exports.serial_port_path_to_info_map = serial_port_path_to_info_map

//serial_path_to_info_map is old and depricated but easier to just
//make it a synonym.
var serial_path_to_info_map = serial_port_path_to_info_map


//serial_path_to_info_map is deprecated in PatchDDE
//var serial_path_to_info_map = serial_port_path_to_info_map
//module.exports.serial_path_to_info_map = serial_path_to_info_map
Expand Down Expand Up @@ -129,7 +134,8 @@ function serial_connect_low_level(port_path,
capture_extras=false,
callback=onReceiveCallback_low_level,
error_callback=onReceiveErrorCallback_low_level,
open_callback=onOpenCallback_low_level){
open_callback=onOpenCallback_low_level,
close_callback=onCloseCallback_low_level){
const port = serial_get_or_make_port(port_path, port_options, open_callback) //new SerialPort(port_path, port_options)
serial_port_path_to_info_map[port_path] =
{port_path: port_path, //Needed because sometimes we get the info without having the path thru serial_path_to_connection_idsimulate: simulate,
Expand All @@ -146,6 +152,9 @@ function serial_connect_low_level(port_path,
callback.call(port, data, port_path)
})
port.on('error', function(data) { error_callback.call(port, data, port_path)})
port.on('close', function () {
close_callback.call(port, port_path)
})
}

module.exports.serial_connect_low_level = serial_connect_low_level
Expand All @@ -160,6 +169,10 @@ function onOpenCallback_low_level(err, port_path){
}
}

function onCloseCallback_low_level(port, port_path){
out("Closing serial port: " + port_path)
}


//not used by DDE robots
function serial_send_low_level(port_path, content){
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.7.11</span><br/>
released: <span id="dde_release_date_id">Apr 20, 2021</span>
version: <span id="dde_version_id">3.7.12</span><br/>
released: <span id="dde_release_date_id">Apr 23, 2021</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
7 changes: 7 additions & 0 deletions doc/ref_man.html
Original file line number Diff line number Diff line change
Expand Up @@ -7938,6 +7938,13 @@
<li>err an error object </li>
<li>port_path a string.</li>
</ul><br/>
<b>close_callback</b> Default: <code title="unEVALable">onCloseCallback_low_level</code><br/>
Called with a <code>this</code> of the port object, and one arguments:
<ul>
<li>port_path a string.</li>
</ul><br/>


<i>Example:</i><br/>
<code title="unEVALable code fragment"> serial_connect_low_level(spath)</code>
</details>
Expand Down
13 changes: 13 additions & 0 deletions doc/release_notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@
.doc_details summary { font-weight: 600; }
</style>

<details class="doc_details"><summary>v 3.7.12, Apr 23, 2021</summary>
Highlights: zeromq npm package re-installed, serial port and Dexter UI dialog tweaks.
<ul>
<li>npm zeromq package installed version 6.0.0-beta:</li>
<li>serial port: <code>old serial_path_to_info_map</code> is now defined to be same
as the new <code>serial_port_path_to_info_map</code>,
but <code>serial_path_to_info_map</code> is deprecated.</li>
<li>serial port: <code>serial_connect_low_level</code> has a new last arg: <code>close_callback</code>
that defaults to a callback fn that just prints out that the port has been closed.</li>
<li>Dexter UI dialog box: improvements to underlying layout html and css.</li>
</ul>
</details>

<details class="doc_details"><summary>v 3.7.11, Apr 20, 2021</summary>
Highlights: improvements to socket handling. New Job status: "stopping'.
No longer using set_link_lengths_using_job.
Expand Down
18 changes: 18 additions & 0 deletions file_transfer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const fs = require('fs')
const get = require('simple-get')
const pump = require('pump')
const path = require('path')

/*
get('https://ballpit.github.io/website/pics.zip', (err, res) => {
if (err) throw err
const outStream = fs.createWriteStream(path.join(__dirname, 'pics.zip'))
pump(res, outStream, (err) => {
if (err) throw err
console.log('done')
})
})
*/
7 changes: 4 additions & 3 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.7.11",
"release_date": "Apr 20, 2021",
"version": "3.7.12",
"release_date": "Apr 23, 2021",
"description": "Dexter Development Environment for programming the Dexter robot.",
"author": "Fry",
"license": "GPL-3.0",
Expand Down Expand Up @@ -59,7 +59,8 @@
"three-orbitcontrols": "^2.110.3",
"three-stl-loader": "^1.0.6",
"three-text2d": "^0.6.0",
"webmidi": "^2.2.0"
"webmidi": "^2.2.0",
"zeromq": "^6.0.0-beta.6"
},
"devDependencies": {
"electron": "^5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion user_tools/dde_2_to_3.dde
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var dde_apps_dir = dde_apps_folder
var file_content = read_file
var serial_path_to_info_map = serial_port_path_to_info_map
// var serial_path_to_info_map = serial_port_path_to_info_map //part of main code as of DDE 3.7.12
var patch_until = PatchDDE.patch_until

var {setFollowMe, setForceProtect, setKeepPosition, setOpenLoop,} = require("./math/Dexter_Modes.js")
Expand Down
18 changes: 9 additions & 9 deletions user_tools/dexter_user_interface2.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,21 +193,21 @@ var dui2 = class dui2 {
job_name: this.name, //important to sync the correct job.
callback: "dui2.dexter_user_interface_cb",
content:
'<span style="margin-top:0px;padding:2px;">Move Dexter to:</span>' +
'<div style="margin-top:-10px;"><span style="margin-top:0px;padding:2px;">Move Dexter to:</span>' +
`<input type="button" name="ready" style="margin-left:10px;margin-top:0px;margin-bottom:3px; padding:2px;" value="ready" title="Move Dexter to a neutal position.&#013;Good for 'elbow room'."/>` +
`<input type="button" name="home" style="margin-left:10px;margin-top:0px;margin-bottom:3px; padding:2px;" value="home" title="Move Dexter straight up.&#013;This doesn't allow much freedom of motion."/>` +
"<span name='step_arrow_buttons'>" + //needed by tutorial
`<span class="clickable" name="go_to_start" style="font-size: 24px; margin-left: 5px; cursor: pointer; color: rgb(0, 200, 0); vertical-align:bottom;" title="Move cursor to before the first instruction&#013;of its containing do_list.">◀</span>` +
`<span class="clickable" name="go_to_start" style="font-size: 24px; margin-left: 5px; cursor: pointer; color: rgb(0, 200, 0); vertical-align:-10%;" title="Move cursor to before the first instruction&#013;of its containing do_list.">◀</span>` +
`<span class="clickable" name="step_backward" style="font-size: 18px; margin-left: 5px; cursor: pointer; color: rgb(0, 200, 0); vertical-align:-10%;" title="Step and execute the instruction before the selection&#013;or, if none, the cursor&#013;in the Job defined in the editor.">◀</span>` +
`<span class="clickable" name="step_forward" style="font-size: 18px; margin-left: 5px; cursor: pointer; color: rgb(0, 200, 0); vertical-align:-10%;" title="Step through the instruction after the selection&#013;or, if none, the cursor&#013;in the Job defined in the editor.">▶</span>` +
`<span class="clickable" name="run_forward" style="font-size: 24px; margin-left: 5px; cursor: pointer; color: rgb(0, 200, 0); vertical-align:-10%;" title="Run the instructions &#013;from the cursor through the end.">▶</span>` +
'<div class="clickable" name="help" style="display:inline-block; margin-left:15px;cursor: pointer;color:blue;font-size:20px;font-weight:bold;" title="Help"> ? </div>' +
"</span>" +
'<div class="clickable" name="help" style="display:inline-block; margin-left:15px;cursor: pointer;color:blue;font-size:20px;font-weight:bold;" title="Help"> ? </div>' +
"</span></div>" +
dui_instance.make_xyz_sliders_html(xy_width_in_px,
min_x, max_x,
//min_y, max_y are same as min_x, max_x, so don't pass them.
min_z, max_z) +
"<br/>" +
// "<br/>" +
dui_instance.make_joint_sliders_html() +
dui_instance.make_direction_html() +
"<hr style='height:1px; color:black; background-color:black; margin:0px; padding:0px;'/>" +
Expand Down Expand Up @@ -247,7 +247,7 @@ var dui2 = class dui2 {
'style="stroke:black; stroke-width:1;"/>'
let svg_html =
//'<div style="display:inline-block;vertical-align:900%;">
'<br/><b style="margin-right:5px; vertical-align:850%;">Y</b>' +
'<b style="margin-right:5px; vertical-align:850%;">Y</b>' +
//'</div>' +
'<svg tabindex="0" onkeydown="dui2.keydown_on_xy_square_action(event)" onkeyup="dui2.keyup_on_xy_square_action(event)"' +
'style="display:inline-block; border:2px solid black;background-color:' + dui2.xy_background_color + ';margin-bottom:0px;" ' +
Expand Down Expand Up @@ -275,14 +275,14 @@ var dui2 = class dui2 {
let xyz_num_html =
'X: <input name="x_num" type="number" data-oninput="true" style="width:55px;margin-top:0px;" min="' + min_x + '" max="' + max_x + '" value="0" step="0.01" ' + '"/><span style="margin-right:15px;margin-top:0px;">m</span>' +
'Y: <input name="y_num" type="number" data-oninput="true" style="width:55px;margin-top:0px;" min="' + min_x + '" max="' + max_x + '" value="0" step="0.01" ' + '"/><span style="margin-right:15px;margin-top:0px;">m</span>' +
'Z: <input name="z_num" type="number" data-oninput="true" style="width:55px;margin-top:0px;" min="' + min_z + '" max="' + max_z + '" value="0" step="0.01" ' + '"/>m'
'Z: <input name="z_num" type="number" data-oninput="true" style="width:55px;margin-top:0px;" min="' + min_z + '" max="' + max_z + '" value="0" step="0.01" ' + '"/>m<br/>'

let z_slider_restriction_html = '<div style="position:absolute; top:60px; right:25px; width:20px; height:40px; background-color:' + dui2.xy_background_color + ';"></div>'
let the_html =
svg_html +
"<b style='vertical-align:top;margin-left:15px;'>Z</b>" + z_slider_html +
//z_slider_restriction_html +
'<div style="display:inline; position:absolute; margin-top:10px;margin-bottom:0px;left:10px;top:365px;"><b>X</b>' +
'<div style=" margin-top:-28px;margin-bottom:0px;left:10px;top:365px;"><b>X</b>' +
//'<div margin-top:0px;margin-bottom:0px;left:20px;"><b>X</b>' +

' key inc:<select name="key_inc" title="When using keys to increment x, y, or z,&#013;this is the inc amount.&#013;auto means automatically increase inc&#013;the longer you hold down the key.">' +
Expand All @@ -293,7 +293,7 @@ var dui2 = class dui2 {
'</select>mm ' +
'<span style="margin-left:5px;">J6roll:</span><input name="J6_roll" data-oninput="true" type="number" min="-180" max="180" step="0.1" value="0" style="width:50px;"/>&deg;' +
'<span style="margin-left:3px;" title="Fill in joint angles by moving your Dexter by hand.">FromDex:<input name="from_dexter" type="checkbox" data-oninput="true"/></span>' +
'</div><br/>' +
'</div>' +
xyz_num_html
return the_html
}
Expand Down

0 comments on commit 81a2224

Please sign in to comment.