Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
cfry committed Jun 16, 2020
1 parent 7ff20cb commit ab8cb75
Show file tree
Hide file tree
Showing 22 changed files with 1,521 additions and 438 deletions.
8 changes: 6 additions & 2 deletions core/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
global.dde_version = "3.5.10"
global.dde_release_date = "May 30, 2020"
global.dde_version = "3.5.11"
global.dde_release_date = "Jun 16, 2020"

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 @@ -144,6 +144,7 @@ var {FPGA} = require("./fpga.js")
var {SerialPort, serial_connect, serial_connect_low_level,
serial_devices, serial_devices_async,
serial_disconnect, serial_disconnect_all, serial_flush,
serial_get_or_make_port, serial_path_to_port_map,
serial_path_to_info_map, serial_port_init, serial_send, serial_send_low_level} = require("./serial.js")

var {close_readline, set_keep_alive_value, write_to_stdout} = require("./stdio.js")
Expand All @@ -155,6 +156,7 @@ global.Dexter = Dexter
global.Human = Human
global.Robot = Robot
global.RobotStatus = RobotStatus
global.Serial = Serial

global.make_ins = Dexter.make_ins

Expand Down Expand Up @@ -208,6 +210,8 @@ global.serial_devices_async = serial_devices_async
global.serial_disconnect = serial_disconnect
global.serial_disconnect_all = serial_disconnect_all
global.serial_flush = serial_flush
global.serial_get_or_make_port = serial_get_or_make_port
global.serial_path_to_port_map = serial_path_to_port_map
global.serial_path_to_info_map = serial_path_to_info_map
global.serial_port_init = serial_port_init
global.serial_send = serial_send
Expand Down
17 changes: 12 additions & 5 deletions core/instruction.js
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ Instruction.debugger = class Debugger extends Instruction{ //class name must be
}
else if((Date.now() - this.time_dev_tools_was_opened) < 1000) {
job_instance.set_up_next_do(0) //give open_dev_tools() a chance to ipen up.
//otherwise it won't break when executing debugger;
//otherwise it won't break when executing debugger
//in do_next_item
}
else {
Expand Down Expand Up @@ -1803,7 +1803,9 @@ Instruction.human_notify = class human_notify extends Instruction{
dependent_job_names = [],
//does not have x and y because those are automatically set to make
//multiple notify windows visible.
title, width=400, height=400, background_color="rgb(238, 238, 238)"}={}) {
title,
close_same_titled_windows = false,
width=400, height=400, background_color="rgb(238, 238, 238)"}={}) {

super()
this.task=task,
Expand All @@ -1814,6 +1816,7 @@ Instruction.human_notify = class human_notify extends Instruction{
this.dependent_job_names = dependent_job_names
this.speak=speak
this.title = title
this.close_same_titled_windows = close_same_titled_windows
this.width = width
this.height = height
this.background_color = background_color
Expand Down Expand Up @@ -1844,6 +1847,7 @@ Instruction.human_notify = class human_notify extends Instruction{
width: this.width,
height: this.height,
background_color: this.background_color,
close_same_titled_windows: this.close_same_titled_windows,
callback: human_notify_handler
})
}
Expand Down Expand Up @@ -2686,7 +2690,7 @@ Instruction.start_job = class start_job extends Instruction{
job_instance.set_up_next_do(1)
return
}
else if(["starting", "running"].includes(stat)) {
else if(["starting", "running", "running_when_stopped"].includes(stat)) {
let wait_reason = "Control.start_job waiting at instruction " +
job_instance.program_counter + " for " + this.job_to_start.name + " to complete."
job_instance.set_status_code("waiting", wait_reason)
Expand Down Expand Up @@ -2732,7 +2736,7 @@ Instruction.start_job = class start_job extends Instruction{
this.job_to_start.unsuspend()
job_instance.set_up_next_do(1)
}
else if (["running", "waiting"].includes(stat)){
else if (["running", "waiting", "running_when_stopped"].includes(stat)){
if (this.if_started == "ignore") {job_instance.set_up_next_do(1)}
else if(this.if_started == "error") {
job_instance.stop_for_reason("errored",
Expand Down Expand Up @@ -2796,6 +2800,9 @@ Instruction.stop_job = class stop_job extends Instruction{
//job_to_stop.stop_for_reason("completed", the_stop_reason) //don't do as we only want it to stop when it gets to location
job_to_stop.when_stopped_conditions = this.perform_when_stopped //the stop_job instruction overrules the job def's when_stopped_conditions
job_to_stop.ending_program_counter = this.instruction_location
if(job_to_stop.when_stopped === "wait") {
job_to_stop.when_stopped = "stop" //if I don't do this the job will wait forever.
}
job_instance.set_up_next_do() //continue on with the current job.
//if the current job is the same as the job_to_stop, fine, it will stop
//else the job_to_stop will stop of its own accord now that it has a status of "completed",
Expand Down Expand Up @@ -2968,7 +2975,7 @@ Instruction.wait_until = class wait_until extends Instruction{
constructor (fn_date_dur) {
super()
this.fn_date_dur = fn_date_dur
if (typeof(this.fn_date_dur) == "function"){}
if (typeof(this.fn_date_dur) == "function"){}
else if (this.fn_date_dur instanceof Date) {}
else if (typeof(fn_date_dur) == "number") {}
else if (fn_date_dur instanceof Duration) { this.fn_date_dur = fn_date_dur.to_seconds() }
Expand Down
8 changes: 4 additions & 4 deletions core/je_and_browser_code.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,20 +456,20 @@ static sw_ondragenter(event) {

//"this" is body_id
static sw_drop(event){
console.log("got drop")
//onsole.log("got drop")
event.preventDefault();
event.stopPropagation()
let data = event.dataTransfer.getData("sw_id")
console.log("sw_drop got data: " + data)
//onsole.log("sw_drop got data: " + data)
let [sw_elt_id, left, top] = data.split(",")
event.dataTransfer.clearData("sw_id") //doesn't prevent inserting of the data into the editor
let show_window_elt_being_dragged = body_id.querySelector("#" + sw_elt_id) //window[sw_elt_id]
//event.target //in browser, this is the sw dialog. In DDE this is some codemirror nested elt
//show_window_elt_being_dragged = show_window_elt_being_dragged.closest("DIALOG") ////in browser, this is the sw dialog. In DDE this is null
let new_x = (event.clientX + parseInt(left, 10)) + 'px';
let new_y = (event.clientY + parseInt(top, 10)) + 'px';
console.log("clientX: " + event.clientX + " clientY: " + event.clientY +
" new_x: " + new_x + " new_y: " + new_y)
//onsole.log("clientX: " + event.clientX + " clientY: " + event.clientY +
// " new_x: " + new_x + " new_y: " + new_y)
//let new_x = event.clientX + "px" //event.offsetX + "px"
//show_window_elt_being_dragged.getBoundingClientRect().left + "px"
//let new_y = event.clientY + "px" //event.offsetY + "px"
Expand Down
Loading

0 comments on commit ab8cb75

Please sign in to comment.