Skip to content

Commit

Permalink
Merge branch 'next' into dashboard-highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
pjt0620 committed Dec 18, 2019
2 parents 085dbb4 + 1bb14ea commit a890540
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
5 changes: 5 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ include LICENSE
include openxc/generator/signals.cpp.footer
include openxc/generator/signals.cpp.header
include openxc/tools/templates/dashboard.html
include openxc/tools/static/css/dashboard.css
include openxc/tools/static/js/jquery-3.4.1.min.js
include openxc/tools/static/js/dashboard.js
include openxc/tools/static/js/socket.io.slim.js
include openxc/tools/static/js/jquery.color-2.1.2.min.js
12 changes: 11 additions & 1 deletion openxc/tools/static/js/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ $(document).ready(function() {
socket.on('vehicle data', function(msg, cb) {
// console.log(msg);


if (!msg.hasOwnProperty('name')) {
msg.name = 'Raw-' + msg.bus + '-0x' + msg.id.toString(16);
msg.value = msg.data;
}

if (msg.hasOwnProperty('event')) {
msg.value = msg.value + ': ' + msg.event
}

if (!(msg.name in dataPoints)) {
dataPoints[msg.name] = {
current_data: undefined,
Expand Down Expand Up @@ -159,4 +169,4 @@ function calculateAverageTimeSinceUpdate(updateTime, dataPoint) {
return (dataPoint.average_time_since_update === undefined)
? time_since_update
: (0.1 * time_since_update) + (0.9 * dataPoint.average_time_since_update);
}
}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
],
url='http://github.com/openxc/openxc-python',
packages=find_packages(exclude=["tests", "tests.*"]),
package_data={'openxc': ['generator/signals.cpp*', 'tools/templates/dashboard.html*']},
package_data={'openxc': ['generator/signals.cpp*', 'tools/templates/dashboard.html*', 'tools/static/css/dashboard.css*', 'tools/static/js/dashboard.js*', 'tools/static/js/socket.io.slim.js*', 'tools/static/js/jquery-3.4.1.min.js*', 'tools/static/js/jquery.color-2.1.2.min.js']},
test_suite='nose.collector',
tests_require=['nose'],
install_requires=install_reqs,
Expand Down

0 comments on commit a890540

Please sign in to comment.