Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:BelaPlatform/bela into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliomoro committed Jul 9, 2016
2 parents 5815e04 + 5eaa4d3 commit 671c4f7
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 11 deletions.
36 changes: 26 additions & 10 deletions ide/IDE/libs/IDE-node.js
Expand Up @@ -252,18 +252,25 @@ function socketEvents(socket){

// run-on-boot
socket.on('run-on-boot', project => {
var args;
if (project === 'none'){
args = ['nostartup'];
runOnBoot(socket, ['nostartup']);
} else {
args = ['startup', 'PROJECT='+project];
co(ProjectManager, 'getCLArgs', project)
.then( (CLArgs) => {
var args = '';
for (let key in CLArgs) {
if (key[0] === '-' && key[1] === '-'){
args += key+'='+CLArgs[key]+' ';
} else if (key === 'user'){
args += CLArgs[key];
} else if (key !== 'make'){
args += key+CLArgs[key]+' ';
}
}
runOnBoot(socket, ['startup', 'PROJECT='+project, 'CL='+args])
});
}
var proc = spawn('make', args, {cwd: belaPath});
proc.stdout.setEncoding('utf-8');
proc.stderr.setEncoding('utf-8');
proc.stdout.on('data', data => socket.emit('run-on-boot-log', data) );
proc.stderr.on('data', data => socket.emit('run-on-boot-log', data) );
proc.on('close', () => socket.emit('run-on-boot-log', 'done') );

});

// shell
Expand Down Expand Up @@ -361,13 +368,22 @@ function runOnBootProject(){
if (lines[5] === '# Run on startup disabled -- nothing to do here'){
project = 'none';
} else {
project = lines[5].trim().split(' ')[6].split('/').pop();
project = lines[5].trim().split(' ')[1].split('/').pop();
}
return project;
})
.catch( e => console.log('run-on-boot error', e) );
}

function runOnBoot(socket, args){
var proc = spawn('make', args, {cwd: belaPath});
proc.stdout.setEncoding('utf-8');
proc.stderr.setEncoding('utf-8');
proc.stdout.on('data', data => socket.emit('run-on-boot-log', data) );
proc.stderr.on('data', data => socket.emit('run-on-boot-log', data) );
proc.on('close', () => socket.emit('run-on-boot-log', 'done') );
}

function uploadUpdate(data){

allSockets.emit('std-log', 'Upload completed, saving update file...');
Expand Down
1 change: 1 addition & 0 deletions ide/IDE/public/scope/js/bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ide/IDE/public/scope/js/bundle.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions ide/IDE/public/stylesheet.css
Expand Up @@ -128,6 +128,9 @@ p {
width: 100%;
font-size: 10pt;
}
#beaglert-consoleWrapper span{
white-space: pre;
}
/*.beaglert-console-log-in::before{
content: '>';
color: inherit;
Expand Down
1 change: 1 addition & 0 deletions ide/dev/scope-src/ChannelView.js
Expand Up @@ -21,6 +21,7 @@ class ChannelView extends View{
var key = $element.data().key;
var channel = $element.data().channel;
var value = (key === 'color') ? $element.val() : parseFloat($element.val());
if (isNaN(value)) return;
this.$elements.filterByData('key', key).filterByData('channel', channel).val(value);
channelConfig[channel][key] = value;
this.emit('channelConfig', channelConfig);
Expand Down

0 comments on commit 671c4f7

Please sign in to comment.