Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
cfry committed Nov 13, 2022
1 parent 773ad89 commit bc3ba75
Show file tree
Hide file tree
Showing 13 changed files with 284 additions and 66 deletions.
17 changes: 12 additions & 5 deletions core/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
global.dde_version = "3.8.11" //require("../package.json").version
global.dde_release_date = "Oct 24, 2022" //require("../package.json").release_date
global.dde_version = "3.8.12" //require("../package.json").version
global.dde_release_date = "Nov 12, 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 All @@ -17,6 +17,7 @@ function node_on_ready() {
global.dde_apps_folder = "/srv/samba/share/dde_apps" //process.env.HOME //ie /Users/Fry
//+ "/Documents/dde_apps"
}
init_storage()
//not needed for node version
//var pckg = require('../package.json');
//global.dde_version = pckg.version
Expand Down Expand Up @@ -120,16 +121,19 @@ function run_shell_cmd(cmd_string, options={}, cb=run_shell_cmd_default_cb){
}
var child_process = require("child_process")
var WebSocket = require('ws')
var fs = require('fs')

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

var {to_source_code} = require("./to_source_code.js")

var {adjust_path_to_os, append_to_file,
choose_file, choose_save_file, choose_file_and_get_content, choose_folder,
copy_file_async, copy_folder_async,
dde_init_dot_js_initialize, file_content, //file_content is deprecated
file_exists, folder_listing, folder_separator, folder_name_version_extension,
get_latest_path, get_page_async,
is_folder, load_files,
get_latest_path, get_page, get_page_async,
init_storage, is_folder, load_files,
make_folder, make_full_path, make_unique_path,
persistent_get, persistent_initialize, persistent_remove, persistent_save,
read_file, read_file_async, write_file, write_file_async} = require('./storage.js')
Expand Down Expand Up @@ -182,7 +186,9 @@ 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.fs = fs
global.Socket = Socket
global.to_source_code = to_source_code
global.keep_alive_value = false
global.Brain = Brain
global.Dexter = Dexter
Expand Down Expand Up @@ -236,6 +242,7 @@ global.folder_listing = folder_listing
global.folder_separator = folder_separator
global.folder_name_version_extension = folder_name_version_extension
global.get_latest_path = get_latest_path
global.get_page = get_page
global.get_page_async = get_page_async
global.is_folder = is_folder
global.load_files = load_files
Expand Down
13 changes: 9 additions & 4 deletions core/job.js
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ class Job{
tooltip = "This Job has not been started since it was defined.\nClick to start this Job."
break; //defined but never started.
case "starting":
bg_color = "rgb(210, 255, 190)";
bg_color = "rgb(210, 255, 190)"; //pale green
tooltip = "This Job is in the process of starting.\nClick to stop it."
break;
case "running":
Expand All @@ -959,7 +959,7 @@ class Job{
', sleep (oplet "z") for ' + dur_in_seconds + " second(s)."
}
else {
bg_color = "rgb(136, 255, 136)";
bg_color = "rgb(136, 255, 136)"; //bright green normal running
tooltip = "This Job is running instruction " + this.program_counter +
".\nClick to stop this job."
}
Expand Down Expand Up @@ -1032,7 +1032,12 @@ class Job{
but_elt.title = tooltip
}
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}
//out("color_job_button for job: " + this.name + " status_code: " + this.status_code + " returning bg_color: " + bg_color)
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>\n")
}
}
Expand Down Expand Up @@ -1113,7 +1118,7 @@ class Job{
//returns an array of jobs that either have "robot" as their default robot,
//OR the job's PC is pointing at an instruction that is using "robot".
static active_jobs_using_robot(robot){
result = []
let result = []
let active_jobs = this.active_jobs()
for(let job_instance of adctive_jobs){
if(job_instance.robot === robot) { result.push(job_instance) }
Expand Down
2 changes: 1 addition & 1 deletion core/out.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ function beep({dur = 0.5, frequency = 440, volume = 1, waveform = "triangle", ca
}
module.exports.beep = beep

var {persistent_get} = require("./storage")
var {persistent_get} = require("./storage.js")
var {replace_substrings, starts_with_one_of, stringify_value} = require("./utils.js")
var {exec} = require("child_process")
var {month_names} = require("./utils")
Expand Down
46 changes: 27 additions & 19 deletions core/robot.js
Original file line number Diff line number Diff line change
Expand Up @@ -2333,25 +2333,33 @@ Dexter.prototype.turn_on_j6_and_j7_torque = function(){


//from Dexter_Modes.js (these are instructions. The fns return an array of instructions
Dexter.set_follow_me = function(){ return [make_ins("S", "RunFile", "setFollowMeMode.make_ins"),
Dexter.turn_off_j6_and_j7_torque()]}
Dexter.prototype.set_follow_me = function(){ return [make_ins("S", "RunFile", "setFollowMeMode.make_ins", this),
this.turn_off_j6_and_j7_torque()]}

Dexter.set_force_protect = function(){ return [make_ins("S", "RunFile", "setForceProtectMode.make_ins"),
Dexter.turn_on_j6_and_j7_torque()]}
Dexter.prototype.set_force_protect = function(){ return [make_ins("S", "RunFile", "setForceProtectMode.make_ins", this),
this.turn_on_j6_and_j7_torque()]}

Dexter.set_keep_position = function(){ return [make_ins("S", "RunFile", "setKeepPositionMode.make_ins"),
Dexter.turn_on_j6_and_j7_torque()]}
Dexter.prototype.set_keep_position = function(){ return [make_ins("S", "RunFile", "setKeepPositionMode.make_ins", this),
this.turn_on_j6_and_j7_torque()]}

Dexter.set_open_loop = function(){ return [make_ins("S", "RunFile", "setOpenLoopMode.make_ins"),
Dexter.turn_on_j6_and_j7_torque()]}
Dexter.prototype.set_open_loop = function(){ return [make_ins("S", "RunFile", "setOpenLoopMode.make_ins", this),
this.turn_on_j6_and_j7_torque()]}
Dexter.set_follow_me = function(){ return make_ins("S", "RunFile", "setFollowMeMode.make_ins")
//Dexter.turn_off_j6_and_j7_torque()]
}
Dexter.prototype.set_follow_me = function(){ return make_ins("S", "RunFile", "setFollowMeMode.make_ins", this)
//this.turn_off_j6_and_j7_torque()]
}

Dexter.set_force_protect = function(){ return make_ins("S", "RunFile", "setForceProtectMode.make_ins")
//Dexter.turn_on_j6_and_j7_torque()]
}
Dexter.prototype.set_force_protect = function(){ return make_ins("S", "RunFile", "setForceProtectMode.make_ins", this)
//this.turn_on_j6_and_j7_torque()]
}

Dexter.set_keep_position = function(){ return make_ins("S", "RunFile", "setKeepPositionMode.make_ins")
//Dexter.turn_on_j6_and_j7_torque()]
}
Dexter.prototype.set_keep_position = function(){ return make_ins("S", "RunFile", "setKeepPositionMode.make_ins", this)
//this.turn_on_j6_and_j7_torque()]
}

Dexter.set_open_loop = function(){ return make_ins("S", "RunFile", "setOpenLoopMode.make_ins")
// Dexter.turn_on_j6_and_j7_torque()] //use to be in before Nov 3, 2022 but James N says shouldn't be there
}
Dexter.prototype.set_open_loop = function(){ return make_ins("S", "RunFile", "setOpenLoopMode.make_ins", this)
// this.turn_on_j6_and_j7_torque()] //use to be in before Nov 3, 2022 but James N says shouldn't be there
}


//End Dexter Instructions
Expand Down
Loading

0 comments on commit bc3ba75

Please sign in to comment.