Skip to content

Commit d5f44c1

Browse files
akaJesAdmin
authored andcommitted
macos fixes
1 parent e152552 commit d5f44c1

File tree

6 files changed

+16
-12
lines changed

6 files changed

+16
-12
lines changed

.DS_Store

8 KB
Binary file not shown.

app/console.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ module.exports.init=(http,p,speed)=>{
8383
exports.list=()=>new Promise((done,fail)=>{
8484
SerialPort.list(function (err, ps){
8585
if (err) return fail(err);
86-
done(ps.filter(i=>i.manufacturer).map(i=>{
86+
done(ps.filter(i=>i.manufacturer||/cu\.serial/.test(i.comName)).map(i=>{
8787
var m;
8888
i.status='closed';
8989
if (m=i.comName.match(/(\w+)$/)){
@@ -94,7 +94,7 @@ exports.list=()=>new Promise((done,fail)=>{
9494
}
9595
}
9696
return i;
97-
}));
97+
})||[]);
9898
});
9999
});
100100
exports.changes=()=>new Promise((done,fail)=>{

app/pio.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ var fs = require('fs');
22
var which = require('which');
33
var exec = require('child_process').exec;
44
var spawn = require('child_process').spawn;
5+
require('fix-path')();
56

67
exports.isPIO=()=>new Promise((done,fail)=>which('platformio',(err, resolvedPath)=>err?fail(err):done(resolvedPath)));
78

app/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ var isElectron=module.parent&&module.parent.filename.indexOf('index.js')>=0;
4343

4444
var baseCfg='Marlin';
4545
var serial;
46-
var serial_enabled = !(isElectron&&process.platform=='darwin');
46+
var serial_enabled = true; //!(isElectron&&process.platform=='darwin');
4747
if (serial_enabled)
4848
serial = require('./console');
4949

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "marlin-conf",
3-
"version": "2.7.8",
3+
"version": "2.7.9",
44
"description": "configuration tool for Marlin project",
55
"main": "./index.js",
66
"scripts": {
77
"start": "electron . -G ~/TEST",
88
"build": "build --dir",
9-
"build-dev": "build -l --x64",
9+
"build-dev": "build -m --x64",
1010
"dist": "node builder.js",
1111
"test": "echo \"Error: no test specified\" && exit 1",
1212
"lint": "eslint .",
@@ -57,6 +57,7 @@
5757
"cropper": "^3.0.0-rc.2",
5858
"electron-debug": "^1.2.0",
5959
"express": "^4.15.2",
60+
"fix-path": "^2.1.0",
6061
"font-awesome": "^4.7.0",
6162
"formidable": "^1.1.1",
6263
"get-port": "^3.1.0",

static/consoles.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,24 @@ function changePort(p){
3030
.eq(2).find('a.btn').text(p.speed)
3131
}
3232
function removeTab(name){
33-
$('#'+name).remove();
34-
$('a[href$='+name+']').remove();
33+
var id=name.replace(/\./g,'-')
34+
$('#'+id).remove();
35+
$('a[href$='+id+']').remove();
3536
}
3637
function createTab(name,url){
38+
var id=name.replace(/\./g,'-')
3739
var tab,tmpl;
3840
if(!$('#'+name).length){
3941
_add($('template.port-body'))
40-
.attr('id',name);
42+
.attr('id',id);
4143
tmpl=_add($('template._port-tab'));
42-
tab=tmpl.find('a').attr('href','#'+name)
44+
tab=tmpl.find('a').attr('href','#'+id)
4345
tab.find('>span').text(name)
44-
tmpl.find('a button').on('click',function(){ removeConsole(name); })
46+
tmpl.find('a button').on('click',function(){ removeConsole(id); })
4547
}else
46-
tab=$('a[href$='+name+']');
48+
tab=$('a[href$='+id+']');
4749
tab.tab('show')
48-
return tmpl&&$('#'+name);
50+
return tmpl&&$('#'+id);
4951
}
5052

5153
function removeConsole(port,force){

0 commit comments

Comments
 (0)