Permalink
Browse files

release

  • Loading branch information...
cfry committed Dec 9, 2017
1 parent 548c5bc commit 1b39b8e696e0fce295784323134998b388cf9631
Showing with 208 additions and 435 deletions.
  1. +36 −2 doc/guide.html
  2. +57 −3 doc/ref_man.html
  3. +30 −0 doc/release_notes.html
  4. +2 −0 eslint-lint.js
  5. +1 −1 index.html
  6. +25 −15 instruction.js
  7. +2 −2 package.json
  8. +1 −1 ready.js
  9. +14 −2 robot.js
  10. +8 −0 test_suites.js
  11. +0 −409 user_tools/find_home_for_DDE_2.js
  12. +32 −0 utils.js
@@ -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">2.2.8</span><br/>
released: <span id="dde_release_date_id">Dec 1, 2017</span>
version: <span id="dde_version_id">2.2.9</span><br/>
released: <span id="dde_release_date_id">Dec 8, 2017</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,
@@ -257,6 +257,22 @@
or<br/><samp>Host is down</samp>
several times.
<p></p>
Problems with data connectively can be do to an improper IP address of your Dexter,
ie at some other address than 192.168.1.142. It might also have to do
with its "MAC" address (nothing to do with "Macintosh") not being correctly set.
You can use an IP scanner to see what devices are connected to your computer.
There are many available on the net.
We suggest:
<ul><li>Windows OS: <a target="_blank" href="http://www.advanced-ip-scanner.com/">
Advanced IP Scanner</a></li>
<li>MacOS: "IP Scanner Home", $5 from Apple's "App Store". Use the "App Store.app"
application that should be in your Applications folder to buy and download.</li>
<li>Linux: <a target="_blank" href="http://angryip.org/">Angry IP Scanner</a>
This claims to work for Windows and Mac OS too,
but requires a Java SDK to be installed.
</li>
</ul>
</details> <!-- end Data Connectivity -->
<details class="doc_details"><summary>Verify Joint Wiring</summary>
@@ -1042,6 +1058,24 @@ <h5>Step 3</h5>
<details class="doc_details" id='find_home_doc_id'><summary>Find Home</summary>
Find Home is a tool that you use to help Dexter locate its true home position.
It requires having a "dock" that Dexter parks in a known location.
<p></p>
Find Home is a part of Dexter Calibration. To use Find Home:
<ol>
<li>Choose Jobs menu/Calibrate Dexter</li>
<li>Select the Dexter you want to calibrate (default dexter0)
<li>If you have just built your Dexter from a kit, calibrate
each of the 5 joint's optical sensors. Dexter's bought
pre-built will have had this done at the factory.</li>
<li>If you have never chosen the button <input type="button" value="Calibrate Optical Encoders"/>, do so.
<li>Click the <input type="button" value="Start Find Home"/> button. This will start the FindHome job
and pop up the FindHome dialog box.</li>
<li>With one hand grab Dexter's last link (so it wont fall), then
in the FindHome dialog box, click the button <input type="button" value="Follow"/></li>
<li>Move Dexter into the parked position in the doc near the bottom of the robot.</li>
<li>Let go of Dexter.</li>
<li>Click the button <input type="button" value="Record Park"/></li>
<li>Click the button <input type="button" value="Home"/></li>
</ol>
</details>
@@ -7,7 +7,59 @@
</style>
<details id="i/o_doc_id" class="doc_details"><summary>I/O</summary>
<details class="doc_details"><summary>File Access</summary>
<details class="doc_details"><summary>CSV</summary>
CSV stands for "Comma Separated Value". It is a file format for spreadsheets
and some other two-dimensional data using programs.
Both MicroSoft Excel and Apple Numbers spreadsheets can read and write CSV files.
<p></p>
CSV is not a tight standard. There are variants so beware.
DDE's CSV methods convert a string of CSV into a two dimensional array,
and converts 2 dimensional arrays into strings.
These functions are simple, not meant to handle complex data or lots
of variants.
<details class="doc_details"><summary>array_to_csv</summary>
Converts a two dimensional array into a string that has
its rows separated by the newline character, \n and
the "cells" within each row separated by commas.<br/>
<i>Parameter:</i></br/>
<b>an_array</b> The array is expected to be two dimensional
with the outer arrays representing rows, and
the inner arrays representing cells.<br/>
<i>Example:</i>
<code>array_to_csv([["head one", "head two"], [10, 20], [100, 200]])</code> =><br/>
<samp>`head one,head two\n10,20\n100,200`</samp> <br/>
Note that there are no quotes around the string values of "head one" and "head two".
If this string is read in by <code>csv_to_array</code>,
"head one" and "head two" will be strings and the other values
will be numbers.
<p></p>
You can use DDE's <a href="#" onclick="open_doc(write_file_doc_id)">write_file</a>
to write the result of calling <code>array_to_csv</code> to a file.
</details>
<details class="doc_details"><summary>csv_to_array</summary>
Converts a string of csv format into a two dimensional array.
If the string has a newline char, \n, then newline is used
for the row separator, otherwise \r is used.
(Excel uses \r.)<br/>
If the string has a comma char, then comma is used as the
separator between cells in a row, otherwise tab, \t, is used.
<br/>
<i>Parameter:</i></br/>
<b>a_string</b> The string is expected to have newlines or \r separate rows
and commas or tab characters separate cells within a row.<br/>
<i>Example:</i>
<code>csv_to_array(`head one,head two\n10,20\n100,200`)</code> <br/>=>
<samp>[["head one", "head two"], [10, 20], [100, 200]])</samp>
Note that the numbers in the csv are converted to JS numbers,
and the other values are left as strings.
<p></p>
You can use DDE's <a href="#" onclick="open_doc(file_content_doc_id)">file_content</a>
to get the content of a csv file, then pass it to <code>csv_to_array</code> to
turn it into an array.
</details>
</details> <!-- end CSV -->
<details class="doc_details"><summary>File Access</summary>
Web clients reading an writing files to their local file system has been impossible in the past.
DDE gives you programmatic read/write access to all files under the dde_apps folder
under your Documents folder, typically under the user's home folder.
@@ -4775,8 +4827,10 @@ <h4>Base Units</h4>
<code>operating_system</code>
is a global constant that has
a value of the name of the current operating system.
It will not have upper case characters in it.
Windows OS's have the value "win". Macintosh OS's have the value "mac".
It will not have upper case characters in it.<br/>
Windows OS's have the value "win".<br/>
Macintosh OS's have the value "mac".<br/>
Ubuntu's have the value "linux".<br/>
If you find the value of other operating systems, please tell us!
</details>
<details id="dde_version_doc_id"class="doc_details"><summary>dde_version</summary>
@@ -5,6 +5,36 @@
}
.doc_details summary { font-weight: 600; }
</style>
<details class="doc_details"><summary>v 2.2.9, Dec 8, 2017</summary>
Highlights: CSV conversion for DDE reading and writing spreadsheets.
FindHome calibration improved but still a work-in-progress
<ul>
<li> "dde_error" and "dde_version" defined for lint.
<li> Ref man "operating_system" now documents that
Ubuntu OS has the value "linux".
<li> Human.enter_number now errors if the initial value
is less than the min or more than the max.
<li> show robot_status dialog expanded so you don't have
to scroll to see it all
<li> new functions array_to_csv and csv_to_array
for converting between JavaScript arrays and
common-separated-value strings that are used
by spreadhsheets and other programs.
See Ref Man/IO/CSV
<li> extended user Guide/Configure Dexter/Data Connection/Ping
about trouble shooting with an IP scanner.
<li> FindHome button on the Calibrate window improved.
At the very least, the doc for this is incomplete,
though it has been extended in User Guide/Calibrate Dexter/Find Home
</ul>
</details>
<details class="doc_details"><summary>v 2.2.8, Dec 1, 2017</summary>
Highlights: Bug fixes for Calibrate, FindHome. Doc improvements
<ul>
@@ -24,6 +24,8 @@
"class": false, //I still get a warning for class as a "reserved word"
"close_window": false,
"console": false, //permit using "console" without warning, but don't permit the setting of it.
"dde_error": false,
"dde_version": false,
"Dexter": false,
"dex": false,
"Duration": false,
@@ -2,7 +2,7 @@
<!-- good html validtor: https://www.onlinewebcheck.com/check.php?adv=1 -->
<html lang="en">
<head>
<title>Dexter Development Environment 2.2.8</title>
<title>Dexter Development Environment 2.2.9</title>
<link rel="stylesheet" href="jqwidgets/styles/jqx.base.css" type="text/css" />
<!-- <script type="text/javascript" src="jquery-1.11.3.min.js"></script> -->
<script>window.$ = window.jQuery = require('jquery');</script>
@@ -922,21 +922,31 @@ Instruction.Control.human_enter_number = class human_enter_number extends Instru
add_stop_button = true,
dependent_job_names=[],
title, x=200, y=200, width=400, height=400, background_color="rgb(238, 238, 238)"}={}){
super()
this.task = task
this.user_data_variable_name = user_data_variable_name
this.initial_value=initial_value
this.min = min
this.max = max
this.step = step
this.add_stop_button = add_stop_button
this.dependent_job_names = dependent_job_names
this.title = title
this.x = x
this.y = y
this.width = width
this.height = height
this.background_color = background_color
if (initial_value < min) {
dde_error("Human.enter_number passed an initial value: " + initial_value +
"<br/> that is less than the min value of: " + min)
}
else if (initial_value > max) {
dde_error("Human.enter_number passed an initial value: " + initial_value +
"<br/> that is more than the max value of: " + max)
}
else {
super()
this.task = task
this.user_data_variable_name = user_data_variable_name
this.initial_value=initial_value
this.min = min
this.max = max
this.step = step
this.add_stop_button = add_stop_button
this.dependent_job_names = dependent_job_names
this.title = title
this.x = x
this.y = y
this.width = width
this.height = height
this.background_color = background_color
}
}
do_item (job_instance){
@@ -1,8 +1,8 @@
{
"name": "dexter_dev_env",
"productName": "dexter_dev_env",
"version": "2.2.8",
"release_date": "Dec 1, 2017",
"version": "2.2.9",
"release_date": "Dec 8, 2017",
"description": "Dexter Development Environment",
"author": "Fry",
"license": "GPL-3.0",
@@ -24,7 +24,7 @@
function on_ready() {
const os = require('os');
operating_system = os.platform().toLowerCase()
operating_system = os.platform().toLowerCase() //for Ubuntu, ths returns "linux"
if (operating_system == "darwin") { operating_system = "mac" }
else if (operating_system.startsWith("win")) { operating_system = "win" }
@@ -741,6 +741,18 @@ Dexter = class Dexter extends Robot {
toString(){ return "Dexter." + this.name }
dexter_filepath(){
if (operating_system == "win"){
return "//" + this.ip_address + "/share"
}
else if (operating_system == "mac"){
return "//" + this.ip_address + "/share" //probably wrong
}
else { //presume linux
return "//" + this.ip_address + "/share" //probably wrong
}
}
make_new_robot(keyword_args){
this.name = keyword_args.name
this.ip_address = keyword_args.ip_address
@@ -1872,8 +1884,8 @@ Dexter.show_robot_status = function(){
Dexter.update_robot_status_names_menu_html() +
" <span id='updating_robot_status_info_id' style='font-size:12px'>" + Dexter.update_robot_status_info_html() + "</span>" +
"<span style='font-size:12px;margin-left:10px;'> Updated: <span id='robot_status_window_time_id'>" + Dexter.update_time_string() + "</span></span>",
width: 755,
height: 430
width: 770,
height: 440
})
setTimeout(Dexter.update_robot_status_init, 300)
}
@@ -220,3 +220,11 @@ new TestSuite("micron",
['[1000000, 2000000, "junk"].micron()', "[1, 2, 'junk']"],
["[].micron()", "[]"]
)
new TestSuite("csv",
['var spreadsheet_data = [["head one", "head two"], [10, 20], [100, 200]]'],
["array_to_csv(spreadsheet_data)", '`head one,head two\n10,20\n100,200`'],
['csv_to_array(`head one,head two\n10,20\n100,200`)',
'[["head one", "head two"], [10, 20], [100, 200]]'],
['csv_to_array(array_to_csv(spreadsheet_data))', 'spreadsheet_data']
)
Oops, something went wrong.

0 comments on commit 1b39b8e

Please sign in to comment.