Skip to content
This repository has been archived by the owner on Oct 29, 2019. It is now read-only.

Commit

Permalink
Fixed Chrome 51 startup issue
Browse files Browse the repository at this point in the history
* Updated angular
* Updated firmata
  • Loading branch information
alexandruradovici committed Jun 10, 2016
1 parent 261b931 commit f47b128
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 17 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
Wyliodrin STUDIO 10.7.1
* Fixed Chrome 51 startup
* Fixed connect screen
* Updated angular
* Updated firmata

Wyliodrin STUDIO 10.7
* Added new connect window
* Added Chrome Device firmata port autodetect
* Added Windows 10 IoT Core for DragonBoard and Raspberry Pi

Wyliodrin STUDIO 10.6
* fixed makefile

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"tests"
],
"dependencies": {
"angular": "1.5.2",
"angular": "1.5.6",
"jquery": "~2.1.4",
"angular-ui": "~0.4.0",
"xterm.js": "~0.9.3",
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "__MSG_appName__",
"description":"__MSG_appDesc__",
"version": "10.6",
"version": "10.7",
"manifest_version": 2,
"default_locale":"en",
"author":"Wyliodrin SRL",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"debug": "^2.2.0",
"dexie": "^1.2.0",
"dict": "^1.4.0",
"firmata": "^0.11.3",
"firmata": "^0.12.0",
"highcharts": "^4.2.1",
"highcharts-ng": "0.0.11",
"lodash": "^4.0.1",
Expand Down
26 changes: 17 additions & 9 deletions source/Devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,34 +23,41 @@ class Device
constructor (id)
{
this._id = id;
this.properties = {};
this.parametersArray = [null, null, null, null];
}

addParameters (priority, parameters)
{
this.properties = {};
this.parametersArray[priority] = parameters;
}

eraseProperties (priority)
{
this.properties = {};
this.parametersArray[priority] = null;
}

get (property)
{
debug ('Get '+property+' for '+this.id);
var data = null;
for (var i = this.parametersArray.length-1; i>=0; i--)
var data = this.properties[property];
if (data === undefined)
{
var parameters = this.parametersArray[i];
if (parameters !== null)
for (var i = this.parametersArray.length-1; i>=0; i--)
{
if (parameters[property])
var parameters = this.parametersArray[i];
if (parameters !== null)
{
debug ('Found '+property+' priority '+i+' for id '+this.id);
data = parameters[property];
if (parameters[property])
{
debug ('Found '+property+' priority '+i+' for id '+this.id);
data = parameters[property];
}
}
}
this.properties[property] = data;
}
return data;
}
Expand Down Expand Up @@ -150,9 +157,10 @@ function compactDevices ()
{
for (var i=0; i<devices.length; i++)
{
debug ('Device hasProperties '+devices[i].hasProperties()+' for id '+devices[i].id);
if (!devices[i].hasProperties())
{
debug ('Device '+devices[i].name+' '+devices[i].ip+' has 0 properties');
debug ('Device '+devices[i].id+' has 0 properties');
devices.splice (i, 1);
i--;
}
Expand Down Expand Up @@ -280,8 +288,8 @@ chrome.mdns.onServiceList.addListener (function (services)
device.addParameters (WORKSTATION, parameters);
}
}
compactDevices ();
});
compactDevices ();
}, {serviceType: '_workstation._tcp.local'});

module.exports.getDevices = getDevices;
Expand Down
8 changes: 4 additions & 4 deletions source/public/views/connect.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ <h2>{{ 'BOARD_Connect' | translate }}</h2>
<md-button class="board-connect-btn" ng-click="c.connect ()">
<img src="/public/drawable/network.png">
<md-tooltip md-direction="bottom">
IP AddressWWggd fgdfgd dh WWh fh ggh jdj jhjgd
{{ "IP Address" }}
</md-tooltip>
<div class="board-connect-title">
{{ "IP AddressWWggd fgdfgd dh WWh fh ggh jdj jhjgd" | limitTo:18 }}...
{{ "IP Address" | limitTo:18 }}
</div>
<div class="board-connect-type">
Network
{{ 'DEVICE_Network' | translate }}
</div>
</md-button>

Expand All @@ -66,7 +66,7 @@ <h2>{{ 'BOARD_Connect' | translate }}</h2>
{{port.name}}
</div>
<div class="board-connect-type">
{{ 'Serial' | translate }}
{{ 'DEVICE_Serial' | translate }}
</div>
<div class="board-connect-address">
{{device.path}}
Expand Down
9 changes: 8 additions & 1 deletion source/public/wyliodrin.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,15 @@ var app = angular.module ("wyliodrinApp", ['ui.ace', 'ngSanitize', 'highcharts-n
{
$provide.decorator('$window', function($delegate)
{
try
{
$delegate.history = null;
return $delegate;
}
catch (e)
{

}
return $delegate;
});
});

Expand Down

0 comments on commit f47b128

Please sign in to comment.