Skip to content

Commit a890540

Browse files
authored
Merge branch 'next' into dashboard-highlighting
2 parents 085dbb4 + 1bb14ea commit a890540

3 files changed

Lines changed: 17 additions & 2 deletions

File tree

MANIFEST.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@ include LICENSE
44
include openxc/generator/signals.cpp.footer
55
include openxc/generator/signals.cpp.header
66
include openxc/tools/templates/dashboard.html
7+
include openxc/tools/static/css/dashboard.css
8+
include openxc/tools/static/js/jquery-3.4.1.min.js
9+
include openxc/tools/static/js/dashboard.js
10+
include openxc/tools/static/js/socket.io.slim.js
11+
include openxc/tools/static/js/jquery.color-2.1.2.min.js

openxc/tools/static/js/dashboard.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ $(document).ready(function() {
1313
socket.on('vehicle data', function(msg, cb) {
1414
// console.log(msg);
1515

16+
17+
if (!msg.hasOwnProperty('name')) {
18+
msg.name = 'Raw-' + msg.bus + '-0x' + msg.id.toString(16);
19+
msg.value = msg.data;
20+
}
21+
22+
if (msg.hasOwnProperty('event')) {
23+
msg.value = msg.value + ': ' + msg.event
24+
}
25+
1626
if (!(msg.name in dataPoints)) {
1727
dataPoints[msg.name] = {
1828
current_data: undefined,
@@ -159,4 +169,4 @@ function calculateAverageTimeSinceUpdate(updateTime, dataPoint) {
159169
return (dataPoint.average_time_since_update === undefined)
160170
? time_since_update
161171
: (0.1 * time_since_update) + (0.9 * dataPoint.average_time_since_update);
162-
}
172+
}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
],
3232
url='http://github.com/openxc/openxc-python',
3333
packages=find_packages(exclude=["tests", "tests.*"]),
34-
package_data={'openxc': ['generator/signals.cpp*', 'tools/templates/dashboard.html*']},
34+
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']},
3535
test_suite='nose.collector',
3636
tests_require=['nose'],
3737
install_requires=install_reqs,

0 commit comments

Comments
 (0)