From f04d06a42ac7a80d2f8c5dec84bc12691b6694c1 Mon Sep 17 00:00:00 2001 From: cfry Date: Tue, 12 Sep 2023 17:59:15 -0400 Subject: [PATCH] release --- core/index.js | 4 +- doc/guide.html | 4 +- doc/release_notes.html | 13 +++++ low_level_dexter/ViewEyeRealTime.js | 72 +++++++++++++++++++---- low_level_dexter/calibrate_ui.js | 90 +---------------------------- package.json | 4 +- 6 files changed, 80 insertions(+), 107 deletions(-) diff --git a/core/index.js b/core/index.js index 7d644f6..597440b 100644 --- a/core/index.js +++ b/core/index.js @@ -1,5 +1,5 @@ -global.dde_version = "3.8.15" //require("../package.json").version -global.dde_release_date = "Sep 24, 2023" //require("../package.json").release_date +global.dde_version = "3.8.16" //require("../package.json").version +global.dde_release_date = "Sep 12, 2023" //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") diff --git a/doc/guide.html b/doc/guide.html index ea8e5c9..cbf41db 100644 --- a/doc/guide.html +++ b/doc/guide.html @@ -8,8 +8,8 @@
About This is Dexter Development Environment
- version: 3.8.15
- released: Sep 9, 2023 + version: 3.8.16
+ released: Sep 12, 2023

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, diff --git a/doc/release_notes.html b/doc/release_notes.html index 08e861c..1bfb9eb 100644 --- a/doc/release_notes.html +++ b/doc/release_notes.html @@ -6,6 +6,19 @@ .doc_details summary { font-weight: 600; } +
v 3.8.16, Sep 12, 2023 + Highlights: Bug fixes to the Calibration dialog box. +
    +
  • In calibrate_ui.js, removed the first def of init_calibrate as that was + just getting overwritten with the 2nd.
  • +
  • In calibrate_ui.js, increased the window height to 660 to get rid of the vertical scroll bar + in some situations.
  • +
  • New version of function: init_view_eye in file: ViewEyeRealTime.js + and other fixes for the new number widgets at the bottom of the dialog involving + "Number("
  • +
+
+
v 3.8.15, Sep 8, 2023 Highlights: defaults.makeins and Calibrate Dexter dialog improved.
    diff --git a/low_level_dexter/ViewEyeRealTime.js b/low_level_dexter/ViewEyeRealTime.js index f5ed850..da9dd9f 100644 --- a/low_level_dexter/ViewEyeRealTime.js +++ b/low_level_dexter/ViewEyeRealTime.js @@ -28,6 +28,19 @@ function smLinex(run_backwards = false){ result.push (make_ins("F")) //out(run_backwards) for (let j = 0;j < size;j++){ + if(j === 0){ + result.push([ + make_ins("S", "MaxSpeed", Number(RapidSpeed_id.value)), + make_ins("S", "Acceleration",0.0001), + make_ins("S", "StartSpeed",0), + ]) + }else if(j === 1){ + result.push([ + make_ins("S", "MaxSpeed", Number(MaxSpeed_id.value)), + make_ins("S", "Acceleration",Number(Accel_id.value)), + make_ins("S", "StartSpeed",Number(StartSpeed_id.value)), + ]) + } let i = j if(run_backwards){ i = size - j @@ -201,6 +214,19 @@ function display_center_guess(){ append_in_ui("svg_id", thehtml) } +function update_step_size(){ + let step_size = Number(StepSize_id.value) + out("Setting Step Size: " + step_size) + AxisTable = [ + [[step_size, 0, 0, 0, 0], Dexter.J1_A2D_SIN, Dexter.J1_A2D_COS, [-648000*_arcsec, 0, 0, 0, 0], 1240 / 2, [0, 0, 0, 0, 0]], + [[0, step_size, 0, 0, 0], Dexter.J2_A2D_SIN, Dexter.J2_A2D_COS, [0, -324000*_arcsec, 0, 0, 0], 1900 / 2, [0, 0, 0, 0, 0]], + [[0, 0, step_size, 0, 0], Dexter.J3_A2D_SIN, Dexter.J3_A2D_COS, [0, 0, -500000*_arcsec, 0, 0], 1500 / 2, [0, 0, 0, 0, 0]], + [[0, 0, 0, step_size, 0], Dexter.J4_A2D_SIN, Dexter.J4_A2D_COS, [0, 0, 0, -190000*_arcsec, 0], 1800 / 2, [0, 0, 0, 0, 0]], + [[0, 0, 0, 0, step_size], Dexter.J5_A2D_SIN, Dexter.J5_A2D_COS, [0, 0, 0, 0, -148000*_arcsec], 4240 / 2, [0, 0, 0, 0, 0]] + ] + //TODO: this will fail if the joint is looping and the sign of step size in negative +} + var old_point_color = "#dedede" var cal_saved_points_old @@ -248,11 +274,19 @@ function DisplayOldEyePoints(J_num) function init_view_eye(){ //this table has to be here rather than top level in the file even though it is static, //because _nbits_cf and the other units cause errors if referenced at top level. - AxisTable = [[[800/_nbits_cf, 0, 0, 0, 0], Dexter.J1_A2D_SIN, Dexter.J1_A2D_COS, [-648000*_arcsec, 0, 0, 0, 0], 1240 / 2, [0, 0, 0, 0, 0]], - [[0, 800/_nbits_cf, 0, 0, 0], Dexter.J2_A2D_SIN, Dexter.J2_A2D_COS, [0, -324000*_arcsec, 0, 0, 0], 1900 / 2, [0, 0, 0, 0, 0]], - [[0, 0, 800/_nbits_cf, 0, 0], Dexter.J3_A2D_SIN, Dexter.J3_A2D_COS, [0, 0, -500000*_arcsec, 0, 0], 1500 / 2, [0, 0, 0, 0, 0]], - [[0, 0, 0, 800/_nbits_cf, 0], Dexter.J4_A2D_SIN, Dexter.J4_A2D_COS, [0, 0, 0, -190000*_arcsec, 0], 1800 / 2, [0, 0, 0, 0, 0]], - [[0, 0, 0, 0, 800/_nbits_cf], Dexter.J5_A2D_SIN, Dexter.J5_A2D_COS, [0, 0, 0, 0, -148000*_arcsec], 4240 / 2, [0, 0, 0, 0, 0]]] + //let step_size = 800/_nbits_cf + + + update_step_size() + /* + let step_size = + AxisTable = [[[step_size, 0, 0, 0, 0], Dexter.J1_A2D_SIN, Dexter.J1_A2D_COS, [-648000*_arcsec, 0, 0, 0, 0], 1240 / 2, [0, 0, 0, 0, 0]], + [[0, step_size, 0, 0, 0], Dexter.J2_A2D_SIN, Dexter.J2_A2D_COS, [0, -324000*_arcsec, 0, 0, 0], 1900 / 2, [0, 0, 0, 0, 0]], + [[0, 0, step_size, 0, 0], Dexter.J3_A2D_SIN, Dexter.J3_A2D_COS, [0, 0, -500000*_arcsec, 0, 0], 1500 / 2, [0, 0, 0, 0, 0]], + [[0, 0, 0, step_size, 0], Dexter.J4_A2D_SIN, Dexter.J4_A2D_COS, [0, 0, 0, -190000*_arcsec, 0], 1800 / 2, [0, 0, 0, 0, 0]], + [[0, 0, 0, 0, step_size], Dexter.J5_A2D_SIN, Dexter.J5_A2D_COS, [0, 0, 0, 0, -148000*_arcsec], 4240 / 2, [0, 0, 0, 0, 0]]] + */ + window.cal_working_axis = undefined //global needed by calibrate_ui.js @@ -260,11 +294,9 @@ function init_view_eye(){ inter_do_item_dur: .5 * _ms, robot: cal_get_robot(), do_list: [ - function() - { - let J_num = window.cal_working_axis+1 - DisplayOldEyePoints(J_num) - }, + make_ins("S", "MaxSpeed", Number(RapidSpeed_id.value)), + make_ins("S", "Acceleration",0.0001), + make_ins("S", "StartSpeed",0), Dexter.move_all_joints(0, 0, 0, 0, 0), Robot.label("loop_start"), make_ins("w", 42, 64), @@ -279,15 +311,25 @@ function init_view_eye(){ make_ins("S", "J5BoundryLow",-648000*_arcsec), make_ins("S", "J5BoundryHigh",648000*_arcsec), + make_ins("S", "MaxSpeed", Number(MaxSpeed_id.value)), + make_ins("S", "Acceleration",Number(Accel_id.value)), + make_ins("S", "StartSpeed",Number(StartSpeed_id.value)), + + /* make_ins("S", "MaxSpeed", 25*_deg/_s), make_ins("S", "Acceleration",0.00129), make_ins("S", "StartSpeed",5), + */ + + //scan_axis(), smLinex, display_center_guess, + /* make_ins("S", "MaxSpeed",40), make_ins("S", "Acceleration",0.00129), make_ins("S", "StartSpeed",5), + */ function(){ if(cal_is_loop_checked(window.cal_working_axis+1)){ //if looping return [ @@ -298,6 +340,11 @@ function init_view_eye(){ ] } }, + make_ins("S", "MaxSpeed", Number(RapidSpeed_id.value)), + make_ins("S", "Acceleration",0.0001), + make_ins("S", "StartSpeed",0), + Dexter.empty_instruction_queue, + Robot.wait_until(1), Dexter.move_all_joints(0, 0, 0, 0, 0), Dexter.empty_instruction_queue, function() { @@ -305,8 +352,9 @@ function init_view_eye(){ let start_button_dom_elt = window["Start_J_" + J_num + "_id"] start_button_dom_elt.style.backgroundColor = "rgb(230, 179, 255)" cal_instructions_id.innerHTML = - "Click in the center of the dot_pattern circle." - } + "Click in the center of the dot_pattern circle.
    " + }, + Dexter.set_parameter("RunFile", "Defaults.make_ins") ]}) cal_init_view_eye_state = false } diff --git a/low_level_dexter/calibrate_ui.js b/low_level_dexter/calibrate_ui.js index ca6c57d..0afd6d2 100644 --- a/low_level_dexter/calibrate_ui.js +++ b/low_level_dexter/calibrate_ui.js @@ -456,95 +456,7 @@ function init_calibrate() //init_calibrate_optical() //will define (or redefine the calibrate_optical job, which is ok) show_window({ title:"Eye Center Calibration", - x:680, y: 0, width:680, height: 650, - //x:325, y: 0, width:680, height: 640, - content: - "1. Choose a Dexter to calibrate: " + make_dexter_robot_menu_html() + "
    " + - "2. Calibrate optical sensors by
        choosing each joint to calibrate.

    " + - "
    " + - make_calibrate_joint_buttons_html() + - "" + - "
    " + - //"
    " + - // " Right potentiometer:  Clockwise pot rotation →" + - // "
    " + - svg_svg({width:20, height:410, child_elements: [svg_text({x:0, y:380, transform: 'rotate(-90 15 380)', - text:'Left potentiometer:  Clockwise pot rotation →' - })]}) + "" + - svg_svg({id: "svg_id", height: window.cal_svg_height, width: window.cal_svg_height, - html_class: "clickable", style:"background-color:white;", - child_elements: [ - svg_text({text: "X Axis", x: 150, y: 400, size: 30, color: "#DDDDDD", border_width: 1, border_color: "black", style: 'font-weight:bold;'}), - svg_text({text: "Y Axis", x: 30, y: 250, size: 30, color: "#DDDDDD", border_width: 1, border_color: "black", style: 'font-weight:bold;', transform: 'rotate(-90 30 250)'}), - ]}) + - "
        Right potentiometer:  Clockwise pot rotation →
    " + - - - "Legend:    " + - "" - + " = Previous Center    " + - "" - + " = Predicted Center    " + - "" - + " = Center to Save" + - - "

    " + - "MaxSpeed: " + - "" + - " Accel: " + - "" + - " StartSpeed: " + - "" + - " StepSize: " + - "" + - " RSpeed: " + - "" - - - /* - "3. " + - `  4. -  (Experimental)`, - */ - /* - "3. ", - */ - - , callback: handle_cal - }) - open_doc(calibrate_doc_id) - setTimeout(cal_reset_ranges, 200) - setTimeout(function(){ - try{ - //this errors when the robot to calibrate hasn't been chosen yet - let robot_sim = Robot[robot_to_calibrate_id.value].simulate - let sim_actual = Robot.get_simulate_actual(robot_sim) - if(sim_actual === true){ - //show_window({content: "Don't Sim"}) - open_doc(simulate_doc_id) - confirm("Warning: Simulate is set to true so calibration window will not work. \nTo set to false, choose Jobs menu/Simulate/false.") - } - else if (Dexter.all_names.length === 1) { cal_init_robot() } //Fry added Oct 19, 2018 - }catch(err){ - - } - }, 1000) -} - -function init_calibrate() -{ - //this has been moved because the robot isn't known yet - //init_view_eye() //will define (or redefine the view eye job, which is ok) - cal_init_view_eye_state = true - - - //init_calibrate_optical() //will define (or redefine the calibrate_optical job, which is ok) - show_window({ - title:"Eye Center Calibration", - x:680, y: 0, width:680, height: 650, + x:680, y: 0, width:680, height: 660, //x:325, y: 0, width:680, height: 640, content: "1. Choose a Dexter to calibrate: " + make_dexter_robot_menu_html() + "
    " + diff --git a/package.json b/package.json index fe0d1ec..2e439f5 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "dexter_dev_env", "productName": "dexter_dev_env", - "version": "3.8.15", - "release_date": "Sep 8, 2023", + "version": "3.8.16", + "release_date": "Sep 12, 2023", "description": "Dexter Development Environment for programming the Dexter robot.", "author": "Fry", "license": "GPL-3.0",