Version 2.0

This commit is contained in:
Sébastien DI MERCURIO 2018-11-13 15:57:45 +01:00
commit 23ceedda5d
954 changed files with 104414 additions and 28857 deletions

3
.gitignore vendored
View file

@ -62,3 +62,6 @@ GUI
# Android
*.apk
/software/raspberry/superviseur-robot/superviseur/dist/
/software/raspberry/testeur/testeur/build/
/software/raspberry/testeur/testeur/dist/

16
.vscode/c_cpp_properties.json vendored Normal file
View file

@ -0,0 +1,16 @@
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/bin/clang",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "clang-x64"
}
],
"version": 4
}

16
.vscode/tasks.json vendored Normal file
View file

@ -0,0 +1,16 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"taskName": "Compile on raspberry",
"command": "rsync -az '${file}' 10.105.1.6:~ && ssh server.example.org 'chmod +x ./${fileBasename}; ./${fileBasename}'",
"type": "shell",
"group": {
"kind": "build",
"isDefault": true
}
}
]
}

View file

@ -1 +0,0 @@
node_modules

View file

@ -1,20 +0,0 @@
# Installation
Cette partie contient la partie "backend" et "frontend"
la partie backend correspond à server.js alors que le front est le résultat du build de l'interface créer avec webpack.
On a donc uniquement le dossier "dist"
"src" a été rajouté pour satisfaire les curieux sur le frontend, mais il est impossible de compiler directement avec ces éléments seulements.
```
npm install --save
```
# Lancement
```
./server.js
```
ou
```
node server.js
```
En vas d'absence variable d'environnement "port" le serveur écoutera le port 3000.

View file

@ -1,11 +0,0 @@
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons" rel=stylesheet><link href=https://unpkg.com/vuetify/dist/vuetify.min.css rel=stylesheet><style>img{
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
}
html{
width: 100%;
height: 100%;
}</style><title>Dumby User Interface</title><link href=/static/css/app.4a7868781302837201d91bdb0ae1e87b.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.718132ea847827f5d365.js></script><script type=text/javascript src=/static/js/vendor.b426f2cbabf67eb78c1a.js></script><script type=text/javascript src=/static/js/app.29d7c2a7593408c61110.js></script></body></html>

View file

@ -1,14 +0,0 @@
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="102" width="102" y="-1" x="-1"/>
<g display="none" overflow="visible" y="0" x="0" height="100%" width="100%" id="canvasGrid">
<rect fill="url(#gridpattern)" stroke-width="0" y="0" x="0" height="100%" width="100%"/>
</g>
</g>
<g>
<title>Layer 1</title>
<path transform="rotate(90, 50, 50.2548)" id="svg_2" d="m53.448662,50.254662l-20.200256,-17.133644l13.303299,0l20.19989,17.133644l-20.19989,17.133873l-13.303299,0l20.200256,-17.133873z" stroke-width="1.5" stroke="#000" fill="#000000"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 740 B

View file

@ -1,14 +0,0 @@
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="102" width="102" y="-1" x="-1"/>
<g display="none" overflow="visible" y="0" x="0" height="100%" width="100%" id="canvasGrid">
<rect fill="url(#gridpattern)" stroke-width="0" y="0" x="0" height="100%" width="100%"/>
</g>
</g>
<g>
<title>Layer 1</title>
<path transform="rotate(180, 50, 50.2548)" id="svg_2" d="m53.448662,50.254662l-20.200256,-17.133644l13.303299,0l20.19989,17.133644l-20.19989,17.133873l-13.303299,0l20.200256,-17.133873z" stroke-width="1.5" stroke="#000" fill="#000000"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 741 B

View file

@ -1,14 +0,0 @@
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="102" width="102" y="-1" x="-1"/>
<g display="none" overflow="visible" y="0" x="0" height="100%" width="100%" id="canvasGrid">
<rect fill="url(#gridpattern)" stroke-width="0" y="0" x="0" height="100%" width="100%"/>
</g>
</g>
<g>
<title>Layer 1</title>
<path id="svg_2" d="m53.448662,49.999886l-20.200256,-17.133644l13.303299,0l20.19989,17.133644l-20.19989,17.133873l-13.303299,0l20.200256,-17.133873z" stroke-width="1.5" stroke="#000" fill="#000000"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 704 B

View file

@ -1,14 +0,0 @@
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="102" width="102" y="-1" x="-1"/>
<g display="none" overflow="visible" y="0" x="0" height="100%" width="100%" id="canvasGrid">
<rect fill="url(#gridpattern)" stroke-width="0" y="0" x="0" height="100%" width="100%"/>
</g>
</g>
<g>
<title>Layer 1</title>
<path transform="rotate(-90, 50, 50)" id="svg_2" d="m53.448662,49.999886l-20.200256,-17.133644l13.303299,0l20.19989,17.133644l-20.19989,17.133873l-13.303299,0l20.200256,-17.133873z" stroke-width="1.5" stroke="#000" fill="#000000"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 736 B

View file

@ -1,15 +0,0 @@
<svg width="88" height="28" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="30" width="90" y="-1" x="-1"/>
</g>
<g>
<title>Layer 1</title>
<rect id="svg_1" height="26.315784" width="81.894718" y="0.999998" x="1" fill-opacity="null" stroke-opacity="null" stroke-width="2" stroke="#4c4c4c" fill="none"/>
<rect id="svg_2" height="20.210522" width="22.736838" y="3.947366" x="4.578944" stroke-opacity="null" stroke-width="2" stroke="#4c4c4c" fill="#4c4c4c"/>
<rect id="svg_5" height="20.210522" width="22.736838" y="3.947366" x="30.789471" stroke-opacity="null" stroke-width="2" stroke="#4c4c4c" fill="#4c4c4c"/>
<rect id="svg_6" height="20.210522" width="22.736838" y="3.947366" x="56.789459" stroke-opacity="null" stroke-width="2" stroke="#4c4c4c" fill="#4c4c4c"/>
<rect id="svg_7" height="5.263157" width="3.999999" y="12.368417" x="82.894717" stroke-opacity="null" stroke-width="2" stroke="#4c4c4c" fill="none"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -1,16 +0,0 @@
<svg width="88" height="28" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect x="-1" y="-1" width="17.714263" height="6.999993" id="canvas_background" fill="none"/>
</g>
<g>
<title>Layer 1</title>
<rect fill="none" stroke="#ffffff" stroke-width="2" fill-opacity="null" x="1" y="0.999998" width="81.894718" height="26.315784" id="svg_1"/>
<rect fill="#ffffff" stroke="#ffffff" stroke-width="2" x="4.578944" y="3.947366" width="22.736838" height="20.210522" id="svg_2"/>
<rect fill="#ffffff" stroke="#ffffff" stroke-width="2" x="30.789471" y="3.947366" width="22.736838" height="20.210522" id="svg_5"/>
<rect fill="#ffffff" stroke="#ffffff" stroke-width="2" x="56.789459" y="3.947366" width="22.736838" height="20.210522" id="svg_6"/>
<rect fill="none" stroke="#ffffff" stroke-width="2" x="82.894717" y="12.368417" width="3.999999" height="5.263157" id="svg_7"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 992 B

View file

@ -1,14 +0,0 @@
<svg width="88" height="28" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="30" width="90" y="-1" x="-1"/>
</g>
<g>
<title>Layer 1</title>
<rect id="svg_1" height="26.315784" width="81.894718" y="0.999998" x="1" fill-opacity="null" stroke-opacity="null" stroke-width="2" stroke="#4c4c4c" fill="none"/>
<rect id="svg_2" height="20.210522" width="8.842102" y="3.947366" x="4.578944" stroke-opacity="null" stroke-width="2" stroke="#4c4c4c" fill="#4c4c4c"/>
<rect id="svg_7" height="5.263157" width="3.999999" y="12.368417" x="82.894717" stroke-opacity="null" stroke-width="2" stroke="#4c4c4c" fill="none"/>
<path id="svg_8" d="m54.798424,20.400599l-2.790161,-4.677445c-0.841221,-1.409811 -2.217152,-3.717751 -3.058323,-5.127771l-2.789875,-4.6774c-0.842064,-1.410675 -2.218014,-1.410675 -3.058952,0l-2.789314,4.6774c-0.841179,1.410021 -2.217922,3.718452 -3.05896,5.127771l-2.789524,4.677445c-0.841179,1.411167 -0.152626,2.56464 1.529472,2.56464l17.274529,0c1.683743,0 2.371479,-1.153473 1.531109,-2.56464l0,0zm-9.371113,0.724201l-1.654819,0l0,-1.538128l1.654819,0l0,1.538128zm-0.079727,-2.671261l-1.493965,0l-0.148476,-6.580343l1.777653,0l-0.135212,6.580343z" fill="#666666"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -1,14 +0,0 @@
<svg width="88" height="28" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="30" width="90" y="-1" x="-1"/>
</g>
<g>
<title>Layer 1</title>
<rect id="svg_1" height="26.315784" width="81.894718" y="0.999998" x="1" stroke-width="2" stroke="#ffffff" fill="none"/>
<rect id="svg_2" height="20.210522" width="8.842102" y="3.947366" x="4.578944" stroke-width="2" stroke="#ffffff" fill="#ffffff"/>
<rect id="svg_7" height="5.263157" width="3.999999" y="12.368417" x="82.894717" stroke-width="2" stroke="#ffffff" fill="none"/>
<path id="svg_9" d="m60.694698,20.577425l-3.23653,-4.731917c-0.975735,-1.426157 -2.571877,-3.761006 -3.5476,-5.187507l-3.236504,-4.731595c-0.976608,-1.427078 -2.572712,-1.427078 -3.547989,0l-3.235592,4.731595c-0.976166,1.4265 -2.573158,3.761847 -3.548439,5.187507l-3.236038,4.731917c-0.975723,1.427576 -0.177002,2.594461 1.774445,2.594461l20.038418,0c1.953274,0 2.750664,-1.166885 1.775829,-2.594461l0,0zm-10.870243,0.732548l-1.919575,0l0,-1.555851l1.919575,0l0,1.555851zm-0.092484,-2.702253l-1.73328,0l-0.172131,-6.657048l2.062057,0l-0.156647,6.657048z" stroke="#ffffff" fill="#ffffff"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -1,14 +0,0 @@
<svg width="88" height="28" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="30" width="90" y="-1" x="-1"/>
</g>
<g>
<title>Layer 1</title>
<rect id="svg_1" height="26.315784" width="81.894718" y="0.999998" x="1" fill-opacity="null" stroke-opacity="null" stroke-width="2" stroke="#4c4c4c" fill="none"/>
<rect id="svg_2" height="20.210522" width="22.736838" y="3.947366" x="4.578944" stroke-opacity="null" stroke-width="2" stroke="#4c4c4c" fill="#4c4c4c"/>
<rect id="svg_5" height="20.210522" width="22.736838" y="3.947366" x="30.789471" stroke-opacity="null" stroke-width="2" stroke="#4c4c4c" fill="#4c4c4c"/>
<rect id="svg_7" height="5.263157" width="3.999999" y="12.368417" x="82.894717" stroke-opacity="null" stroke-width="2" stroke="#4c4c4c" fill="none"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 932 B

View file

@ -1,15 +0,0 @@
<svg width="88" height="28" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect x="-1" y="-1" width="20.526313" height="7.894736" id="canvas_background" fill="none"/>
</g>
<g>
<title>Layer 1</title>
<rect fill="none" stroke="#ffffff" stroke-width="2" fill-opacity="null" x="1" y="0.999998" width="81.894718" height="26.315784" id="svg_1"/>
<rect fill="#ffffff" stroke="#ffffff" stroke-width="2" x="4.578944" y="3.947366" width="22.736838" height="20.210522" id="svg_2"/>
<rect fill="#ffffff" stroke="#ffffff" stroke-width="2" x="30.789471" y="3.947366" width="22.736838" height="20.210522" id="svg_5"/>
<rect fill="none" stroke="#ffffff" stroke-width="2" x="82.894717" y="12.368417" width="3.999999" height="5.263157" id="svg_7"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 858 B

View file

@ -1,2 +0,0 @@
.notif{margin-left:50%;-webkit-transform:translate(-50%);transform:translate(-50%);position:absolute;z-index:10}.consoleMes{text-align:left;border:solid;border-width:1px;border-color:#d3d3d3;border-radius:5px;padding-left:10px;padding-top:20px;padding-bottom:20px;color:#fff;background-color:#241d1d;font:.8em Andale Mono,Consolas,Courier New;font-weight:700;font-size:1.1em;min-height:100px;overflow-y:scroll}#console-input{max-height:300px}.direction{border:solid;border-color:#d3d3d3;border-width:1px;border-radius:50%}.touched{background-color:#add8e6}.command{text-align:center}.logo-vue{width:30px;margin-left:15px}.logo{margin-left:12px}#logo-robot{width:35px;margin-top:7px;margin-left:16px}#logo-connection{width:16px;margin-top:5px;margin-left:30px}#logo-battery{width:50px;margin-left:30px}#led-connection{width:20px;height:20px;padding-left:10px;margin-left:10px}.led{border-radius:50%;background-color:red;border:solid;border-width:2px}.light{background-color:#0f0}#fps{position:absolute;top:10px;left:20px;color:red}#video{width:100%;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;-ms-user-select:none;user-select:none}#video:hover{cursor:crosshair}.clikable:hover{cursor:pointer}.position_place{border:solid;border-color:#add8e6;padding:10px;border-width:1px}.loading{padding-top:10%;position:fixed;z-index:10;width:100%;height:100%;background-color:#2e2525;color:hsla(0,0%,100%,.788)}.center{text-align:center;width:100%}
/*# sourceMappingURL=app.4a7868781302837201d91bdb0ae1e87b.css.map */

View file

@ -1 +0,0 @@
{"version":3,"sources":["app.4a7868781302837201d91bdb0ae1e87b.css"],"names":[],"mappings":"AACA,OACE,gBAAiB,AACjB,kCAAmC,AAC3B,0BAA2B,AACnC,kBAAmB,AACnB,UAAY,CACb,AAqCD,YACG,gBAAiB,AACjB,aAAa,AACb,iBAAiB,AACjB,qBAAuB,AACvB,kBAAkB,AAClB,kBAAmB,AACnB,iBAAiB,AACjB,oBAAoB,AACpB,WAAY,AACZ,yBAAiC,AACjC,2CAAmD,AACnD,gBAAkB,AAClB,gBAAiB,AACjB,iBAAkB,AAClB,iBAAmB,CACrB,AACD,eACI,gBAAkB,CACrB,AAED,WACI,aAAa,AACb,qBAAuB,AACvB,iBAAkB,AAClB,iBAAmB,CACtB,AACD,SACI,wBAA2B,CAC9B,AACD,SACI,iBAAmB,CACtB,AAED,UACI,WAAY,AACZ,gBAAiB,CACpB,AAED,MACE,gBAAiB,CAClB,AACD,YACE,WAAY,AACZ,eAAe,AACf,gBAAiB,CAClB,AACD,iBACE,WAAY,AACZ,eAAe,AACf,gBAAiB,CAClB,AACD,cACE,WAAW,AACX,gBAAkB,CACnB,AACD,gBACE,WAAW,AACX,YAAa,AACb,kBAAkB,AAClB,gBAAiB,CAClB,AAED,KACI,kBAAmB,AACnB,qBAAsB,AACtB,aAAa,AACb,gBAAkB,CACrB,AACD,OACI,qBAAiC,CACpC,AAED,KACG,kBAAmB,AACnB,SAAS,AACT,UAAU,AACV,SAAU,CACZ,AACD,OACG,WAAY,AACZ,yBAA0B,AAC1B,sBAAuB,AACvB,oBAAqB,AACrB,qBAAsB,AAClB,gBAAkB,CACxB,AACD,aAEG,gBAAiB,CACnB,AACD,gBAEG,cAAe,CACjB,AACD,gBACE,aAAa,AACb,qBAAwB,AACxB,aAAe,AACf,gBAAkB,CACnB,AAED,SACI,gBAAiB,AACjB,eAAe,AACf,WAAY,AACZ,WAAW,AACX,YAAa,AACb,yBAAkC,AAClC,0BAAkC,CACrC,AAED,QACI,kBAAmB,AAEnB,UAAY,CACf","file":"app.4a7868781302837201d91bdb0ae1e87b.css","sourcesContent":["\n.notif{\n margin-left: 50%;\n -webkit-transform: translate(-50%);\n transform: translate(-50%);\n position: absolute;\n z-index: 10;\n}\n.center{\n text-align: center;\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.consoleMes{\n text-align: left; \n border:solid;\n border-width:1px;\n border-color:lightgray;\n border-radius:5px;\n padding-left: 10px;\n padding-top:20px;\n padding-bottom:20px;\n color:white;\n background-color:rgb(36, 29, 29);\n font: 0.8em 'Andale Mono', Consolas, 'Courier New';\n font-weight: bold;\n font-size: 1.1em;\n min-height: 100px;\n overflow-y: scroll;\n}\n#console-input{\n max-height: 300px;\n}\n\n.direction{\n border:solid;\n border-color:lightgray;\n border-width: 1px;\n border-radius: 50%;\n}\n.touched{\n background-color:lightblue;\n}\n.command{\n text-align: center;\n}\n\n.logo-vue{\n width: 30px;\n margin-left:15px;\n}\n\n.logo{\n margin-left:12px;\n}\n#logo-robot{\n width: 35px;\n margin-top:7px;\n margin-left:16px;\n}\n#logo-connection{\n width: 16px;\n margin-top:5px;\n margin-left:30px;\n}\n#logo-battery{\n width:50px;\n margin-left: 30px;\n}\n#led-connection{\n width:20px;\n height: 20px;\n padding-left:10px;\n margin-left:10px;\n}\n\n.led{\n border-radius: 50%;\n background-color: red;\n border:solid;\n border-width: 2px;\n}\n.light{\n background-color: rgb(0, 255, 0);\n}\n\n#fps{\n position: absolute;\n top:10px;\n left:20px;\n color:red;\n}\n#video{\n width: 100%;\n -webkit-user-select: none;\n -moz-user-select: none;\n -o-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n#video:hover\n {\n cursor:crosshair;\n}\n.clikable:hover\n {\n cursor:pointer;\n}\n.position_place{\n border:solid;\n border-color: lightblue;\n padding : 10px;\n border-width: 1px;\n}\n\n.loading{\n padding-top: 10%;\n position:fixed;\n z-index: 10;\n width:100%;\n height: 100%;\n background-color: rgb(46, 37, 37);\n color: rgba(255, 255, 255, 0.788);\n} \n\n.center{\n text-align: center;\n\n width: 100%;\n}\n"]}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,2 +0,0 @@
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var i,u,f,s=0,l=[];s<r.length;s++)u=r[s],t[u]&&l.push(t[u][0]),t[u]=0;for(i in c)Object.prototype.hasOwnProperty.call(c,i)&&(e[i]=c[i]);for(n&&n(r,c,a);l.length;)l.shift()();if(a)for(s=0;s<a.length;s++)f=o(o.s=a[s]);return f};var r={},t={2:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,o.nc&&a.setAttribute("nonce",o.nc),a.src=o.p+"static/js/"+e+"."+{0:"b426f2cbabf67eb78c1a",1:"29d7c2a7593408c61110"}[e]+".js";var i=setTimeout(u,12e4);function u(){a.onerror=a.onload=null,clearTimeout(i);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return a.onerror=a.onload=u,c.appendChild(a),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="/",o.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.718132ea847827f5d365.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

View file

@ -1,14 +0,0 @@
<svg width="37" height="45" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect x="-1" y="-1" width="4.998385" height="5.646685" id="canvas_background" fill="none"/>
</g>
<g>
<title>Layer 1</title>
<rect fill="#ffffff" stroke="#ffffff" stroke-width="3" x="1.499999" y="12.033397" width="34" height="31.198336" id="svg_1"/>
<path fill="#ffffff" stroke="#ffffff" stroke-width="3" d="m1.787369,10.792826l6.707077,-9.292826l20.121235,0l6.706993,9.292826l-6.706993,9.293005l-20.121235,0l-6.707077,-9.293005z" id="svg_3"/>
<path fill="#ff007f" stroke="#f50057" stroke-width="0.1" d="m6.012915,23.986172c3.391615,0 6.58049,1.356598 8.976097,3.815023c2.400892,2.460051 3.720869,5.73773 3.720869,9.225225l5.228432,0c0,-10.132326 -8.042473,-18.374136 -17.92646,-18.374136l0,5.333887l0.001063,0l-0.000001,0zm0.006737,-9.457245c12.090816,0 21.925318,10.094976 21.925318,22.503983l5.226238,0c0,-15.349382 -12.180334,-27.8395 -27.152637,-27.8395l0,5.335514l0.001082,0l-0.000001,0.000004zm7.228214,18.774704c0,2.041348 -1.620888,3.698376 -3.619726,3.698376s-3.619571,-1.657028 -3.619571,-3.698376c0,-2.037918 1.620992,-3.694717 3.619571,-3.694717s3.619726,1.653553 3.619726,3.694717z" id="svg_8"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -1,13 +0,0 @@
<svg width="52" height="42" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="44" width="54" y="-1" x="-1"/>
</g>
<g>
<title>Layer 1</title>
<path id="svg_7" d="m47.913887,6.962914c0,3.845634 -9.750057,6.963047 -21.777805,6.963047m21.777805,-6.963047l0,0c0,3.845634 -9.750057,6.963047 -21.777805,6.963047c-12.027187,0 -21.777691,-3.117413 -21.777691,-6.963047m0,0l0,0c0,-3.845406 9.750504,-6.962914 21.777691,-6.962914c12.027748,0 21.777805,3.117508 21.777805,6.962914l0,27.851788c0,3.845512 -9.750057,6.96302 -21.777805,6.96302c-12.027187,0 -21.777691,-3.117508 -21.777691,-6.96302l0,-27.851788z" stroke-width="NaN" stroke="#4c4c4c" fill="#4c4c4c"/>
<line stroke-linecap="null" stroke-linejoin="null" id="svg_8" y2="32.176623" x2="50.555556" y1="9.806282" x1="50.703705" stroke-width="2" stroke="#4c4c4c" fill="none"/>
<line stroke-linecap="null" stroke-linejoin="null" id="svg_9" y2="32.769215" x2="1.296296" y1="10.398873" x1="1.444445" stroke-width="2" stroke="#4c4c4c" fill="none"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -1,14 +0,0 @@
<svg width="72" height="49" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="51" width="74" y="-1" x="-1"/>
</g>
<g>
<title>Layer 1</title>
<path id="svg_7" d="m58.199665,10.123037c0,3.845639 -9.750061,6.963049 -21.777809,6.963049m21.777809,-6.963049l0,0c0,3.845639 -9.750061,6.963049 -21.777809,6.963049c-12.027191,0 -21.777691,-3.11741 -21.777691,-6.963049m0,0l0,0c0,-3.8454 9.7505,-6.96291 21.777691,-6.96291c12.027748,0 21.777809,3.11751 21.777809,6.96291l0,27.851789c0,3.845509 -9.750061,6.96302 -21.777809,6.96302c-12.027191,0 -21.777691,-3.117512 -21.777691,-6.96302l0,-27.851789z" stroke-width="NaN" stroke="#ffffff" fill="#ffffff"/>
<line stroke-linecap="null" stroke-linejoin="null" id="svg_8" y2="33.926006" x2="65.660338" y1="11.555665" x1="65.808487" stroke-width="5" stroke="#ffffff" fill="none"/>
<line stroke-linecap="null" stroke-linejoin="null" id="svg_9" y2="33.847692" x2="7.819088" y1="11.47735" x1="7.967237" stroke-width="5" stroke="#ffffff" fill="none"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 364 KiB

View file

@ -1,17 +0,0 @@
{
"name": "dumby_ui",
"version": "1.0.0",
"description": "",
"main": "server.js",
"scripts": {
"start": "nodemon server.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.16.2",
"socket.io": "^2.0.4",
"socket.io-client": "^2.0.4"
}
}

View file

@ -1,312 +0,0 @@
#!/usr/local/bin/node
const express = require('express');
const app = express();
const http = require('http').Server(app);
const net = require('net');
const io = require('socket.io')(http);
let numMes = 1;
app.use(express.static(__dirname + '/dist'));
const socket = new net.Socket();
socket.setEncoding('hex');
const ipSuperviseur = 'localhost';
const port = process.env.port || 3000;
let dataInReception = '';
let lastRequest = '';
let dateOrigin;
const connections = [];
/** DECLARATION FONCTIONS */
/*
* Fonction qui retourne le temps à un message passé en paramétre
*/
function addTime(msg) {
const a = Math.abs(new Date() - dateOrigin);
const date = new Date(a);
const message = `<${date.getMinutes()}:${date.getSeconds()}:${date.getMilliseconds()}>${msg}`;
return message;
}
function sendConsole(msg) {
io.emit('consoleIn', addTime(msg));
}
/*
* Conversion chaine de caractére avec des informations hexa en chaine de caractére
* avec les informations ascii.
*/
function sendNotification(typemes, text) {
const myObj = {
msg: `${numMes} ${text}`,
type: typemes,
};
io.emit('notifications', myObj);
numMes++;
}
function hex2a(hexx) {
const hex = hexx.toString();
let str = '';
for (let i = 0; i < hex.length; i += 2) {
str += String.fromCharCode(parseInt(hex.substr(i, 2), 16));
}
return str;
}
function disconnectTcp() {
socket.write('STO: ');
lastRequest = 'disconnection';
sendConsole('Déconnecté de la cible');
}
function moveForward() {
socket.write('DMB:F ');
lastRequest = 'GoingForward';
sendConsole('Avance');
}
function moveBack() {
socket.write('DMB:B ');
lastRequest = 'GoingBack';
sendConsole('recule');
}
function moveRight() {
socket.write('DMB:R ');
lastRequest = 'TurnRight';
sendConsole('pivot droite');
}
function moveLeft() {
socket.write('DMB:L ');
lastRequest = 'TurnLeft';
sendConsole('pivotGauche');
}
function stopMove() {
socket.write('DMB:S ');
lastRequest = 'Stop';
sendConsole('Stop');
}
function startWithWDDumby() {
socket.write('DMB:W ');
lastRequest = 'StartDumbyWithWD';
}
function startWithoutWDDumby() {
socket.write('DMB:u ');
lastRequest = 'StartDumbyWithoutWD';
}
function restartState() {
socket.write('DMB:r ');
lastRequest = 'idleDumby';
}
function sendPos(position) {
socket.write(`POS:${position.x},${position.y} `);
lastRequest = 'SendPosition';
sendConsole(`Envoi position : ${position.x}, ${position.y}`);
}
function setDisplayPos(data){
if(data === true){
socket.write('CAM:p ');
lastRequest='displayPos';
}else{
socket.write('CAM:s ');
lastRequest='dontDisplayPos';
}
}
function eventArena(data) {
if(data === 'ask'){
socket.write('CAM:y ');
lastRequest = 'askArena';
} else if(data ==='ok'){
socket.write('CAM:x ');
lastRequest = 'arenaConfirm';
}else if(data ==='nok'){
socket.write('CAM:z ');
lastRequest = 'arenaInfirm';
}
}
/*
* Traite une trame de donnée reçu.
*/
function traitmentMessage(val) {
let payload = val.substring(6);
const header = hex2a(val.substring(0, 6));
if (header !== 'IMG') {
payload = hex2a(payload);
sendConsole(`Reçu : ${header}:${payload}`);
}
if (header === 'LCD') {
io.emit('lostSerial', false);
sendNotification('error', 'Communication Xbee : Perdu');
}
if (header === 'ACK') {
if (lastRequest === 'IdleDumby') {
io.emit('dumberDisconected');
}
if (lastRequest === 'openSerial') {
io.emit('serialOpen', true);
sendNotification('success', 'Communication Xbee : OK');
}
if (lastRequest === 'closeSerial') {
io.emit('serialOpen', false);
sendNotification('warning', 'Communication Xbee : fermé');
}
if (lastRequest === 'cameraActive') {
io.emit('cameraState', true);
sendNotification('info', 'Camera activé');
}
if (lastRequest === 'cameraInactive') {
io.emit('cameraState', false);
sendNotification('info', 'Camera désactivé');
}
if (lastRequest === 'StartDumbyWithWD' || lastRequest === 'StartDumbyWithoutWD') {
sendConsole('Dumby is now started');
io.emit('dumbyStart', true);
}
if (lastRequest === 'idleDumby') {
sendConsole('Dumby is now stoped');
io.emit('dumbyStart', false);
}
} else if (header === 'NAK') {
sendNotification('error', `Error with last request : ${lastRequest}`);
if(lastRequest === 'askArena'){
io.emit('detectionError');
}
} else {
if(header === 'BAT'){
io.emit(header, payload.toString());
}else{
io.emit(header, payload);
}
}
}
function serial(data) {
if (data === true) {
socket.write('COM:o ');
lastRequest = 'openSerial';
} else {
socket.write('COM:C ');
lastRequest = 'closeSerial';
}
}
function specialMes(data) {
sendConsole(data);
socket.write(`MSG:${data} `);
}
function camera(state) {
if (state === true) {
lastRequest = 'cameraActive';
socket.write('CAM:A ');
} else {
lastRequest = 'cameraInactive';
socket.write('CAM:I ');
}
}
/*
* Descriptions des fonctions de call back
*/
function connectTcp() {
socket.connect(8080, ipSuperviseur, (err) => {
if (!err) {
dateOrigin = new Date();
io.emit('superViseurConnection', true);
sendNotification('success', 'Connecté au superviseur');
//sendConsole('Connecté au superviseur');
} else {
console.log('erreurConnection');
sendNotification('danger', 'Erreur lors de la connection');
//sendConsole('Erreur survenue lors de la connection au superviseur');
}
});
lastRequest = 'Connection';
}
/*
* bind des evenenements aux fonctions de callback
* Gestion des clients connecté dans la list client[]
*/
function handleConnection(client) {
sendNotification('success', 'Votre interface est connecté au serveur node');
connections.push(client);
client.on('askConnection', connectTcp);
client.on('askDisconnection', disconnectTcp);
client.on('startWithWD', startWithWDDumby);
client.on('startWitouthWD', startWithoutWDDumby);
client.on('idle', restartState);
client.on('sendPos', sendPos);
client.on('displayPos', setDisplayPos);
client.on('arena', eventArena);
client.on('MOVEFORWARD', moveForward);
client.on('MOVEBACK', moveBack);
client.on('MOVERIGHT', moveRight);
client.on('MOVELEFT', moveLeft);
client.on('MOVESTOP', stopMove);
client.on('openSerial', serial);
client.on('camera', camera);
client.on('console-out', specialMes);
client.on('disconnect', () => {
const index = connections.indexOf(client);
connections.splice(index, 1);
});
}
/** FIN DECLARATION FONCTION */
socket.on('error', (err) => {
console.log(`${err}`);
sendNotification('error', 'Erreur impossible de se connecter');
io.emit('superViseurConnection', false);
lastRequest = '';
});
io.on('connection', handleConnection);
socket.on('end', () => {
console.log('superviseur déconnecté');
sendNotification('error', ' Connection au superviseur perdu');
io.emit('superViseurConnection', false);
lastRequest = '';
});
/*
* Evenement sur une donnée tcp reçu
*/
socket.on('data', (data) => {
const trame = data.split('5452414d45'); // Trame sera le parser final ici écrit en hexa
dataInReception += trame[0];
if (trame.length > 1) {
traitmentMessage(dataInReception);
for (let i = 1; i < trame.length - 1; i++) {
traitmentMessage(trame[i]);
}
dataInReception = trame[trame.length - 1];
}
});
/* Gestions des routes
* */
app.get('/', (req, res) => {
res.sendFile('index.html');
});
http.listen(port); // Lancement du serveur web
console.log(`server is now running on port ${port}`);

View file

@ -1,96 +0,0 @@
<template>
<div id="app">
<v-app v-if="wsConnected">
<NotesList class="notif"/>
<v-container grid-list-md>
<Navbar :tcpState="tcpConnected" :serialState="serialOpened"/>
<v-layout row wrap>
<v-flex d-flex xs12 sm6 md6>
<Video :tcpState="tcpConnected"/>
</v-flex>
<v-flex d-flex xs12 sm6 md6>
<v-layout row wrap xs12>
<v-flex d-flex>
<Dashboard :tcpState="tcpConnected" :serialState="serialOpened"/>
</v-flex>
</v-layout>
</v-flex>
<v-flex d-flex xs12 sm12 md12 class="hidden-sm-and-down">
<Console :tcpState="tcpConnected" :serialState="serialOpened"/>
</v-flex>
</v-layout>
<FooterBar/>
</v-container>
</v-app>
<v-app v-else>
<Loading class="center"/>
</v-app>
</div>
</template>
<script>
import NotesList from './components/NotificationList'
import Console from './components/Console'
import Controller from './components/Controller'
import FooterBar from './components/Footerbar'
import Navbar from './components/MyNavbar'
import Video from './components/Video'
import Loading from './components/LoadingScreen'
import Dashboard from './components/DashBoard'
export default {
name: 'App',
data:()=>{
return{
wsConnected: false,
tcpConnected:false,
serialOpened:false,
}
},
components: {
NotesList,
Console,
Controller,
Navbar,
FooterBar,
Video,
Loading,
Dashboard,
},
sockets:{
connect: function(){
return this.wsConnected=true;
},
disconnect: function(){
this.wsConnected=false;
this.tcpConnected = false;
this.tcpSerial = false;
},
superViseurConnection: function(state){
if(typeof(state) === 'boolean')
this.tcpConnected = state;
if(state === false)
this.serialOpened = false;
},
serialOpen: function(state){
if(typeof(state) === 'boolean')
this.serialOpened = state;
}
},
}
</script>
<style>
.notif{
margin-left: 50%;
transform: translate(-50%);
position: absolute;
z-index: 10;
}
.center{
text-align: center;
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 364 KiB

View file

@ -1,66 +0,0 @@
<template>
<div>
<v-layout row wrap>
<v-flex d-flex xs12>
<div id="console-input" class="ui fluid consoleMes"></div>
</v-flex>
<v-flex d-flex xs12>
<v-text-field :disabled="!tcpState" @keyup.enter="consoleOut" label="Envoi Message Console" v-model="output"> </v-text-field>
<v-btn :disabled="!tcpState" icon @click="consoleOut" color="primary" dark><v-icon>send</v-icon></v-btn>
</v-flex>
</v-layout>
</div>
</template>
<script>
export default {
props:['tcpState', 'serialState'],
data:()=>{
return {
output: '',
}
},
sockets:{
consoleIn(message){
if(this.tcpState === true){
let balise = document.createElement('div');
balise.textContent = message;
let console = document.getElementById('console-input').prepend(balise);
}
}
},
methods:{
consoleOut(){
if(this.output !==''){
this.$socket.emit('console-out',this.output.replace(/\s/g, ""));
this.output = '';
}
}
}
}
</script>
<style>
.consoleMes{
text-align: left;
border:solid;
border-width:1px;
border-color:lightgray;
border-radius:5px;
padding-left: 10px;
padding-top:20px;
padding-bottom:20px;
color:white;
background-color:rgb(36, 29, 29);
font: 0.8em 'Andale Mono', Consolas, 'Courier New';
font-weight: bold;
font-size: 1.1em;
min-height: 100px;
overflow-y: scroll;
}
#console-input{
max-height: 300px;
}
</style>

View file

@ -1,103 +0,0 @@
<template>
<div class="command">
<img id="up" src="/static/arrow-up.svg" class="direction" v-bind:class="{touched: keyup}">
<div>
<img id="left" src="/static/arrow-left.svg" class="direction" v-bind:class="{touched: keyleft}">
<img id="down" src="/static/arrow-down.svg" class="direction" v-bind:class="{touched: keydown}">
<img id="right" src="/static/arrow-right.svg" class="direction" v-bind:class="{touched: keyright}">
</div>
</div>
</template>
<script>
export default {
data:()=>{
return {
keyup: false, //38
keydown: false, // 40
keyleft:false, // 37
keyright:false // 39
}
},
mounted:function(){
window.addEventListener('keydown', (event)=> {
if (event.keyCode == 37) {
this.keyleft= true;
}
if (event.keyCode == 38) {
this.keyup=true;
}
if (event.keyCode == 39) {
this.keyright=true;
}
if (event.keyCode == 40) {
this.keydown=true;
}
});
window.addEventListener('keyup', (event)=> {
if (event.keyCode == 37 ) {
this.keyleft=false;
}
if (event.keyCode == 38 ) {
this.keyup=false;
}
if (event.keyCode == 39 ) {
this.keyright=false;
}
if (event.keyCode == 40 ) {
this.keydown=false;
}
});
},
watch:{
keyup:function(){
if(this.keyup===true){
this.$socket.emit('MOVEFORWARD');
}
else{
this.$socket.emit('MOVESTOP');
}
},
keyleft:function(){
if(this.keyleft===true){
this.$socket.emit('MOVERIGHT');
}
else{
this.$socket.emit('MOVESTOP');
}
},
keydown:function(){
if(this.keydown===true){
this.$socket.emit('MOVEBACK');
}
else{
this.$socket.emit('MOVESTOP');
}
},
keyright:function(){
if(this.keyright===true){
this.$socket.emit('MOVELEFT');
}
else{
this.$socket.emit('MOVESTOP');
}
},
}
}
</script>
<style>
.direction{
border:solid;
border-color:lightgray;
border-width: 1px;
border-radius: 50%;
}
.touched{
background-color:lightblue;
}
.command{
text-align: center;
}
</style>

View file

@ -1,95 +0,0 @@
<template>
<v-card color="grey lighten-4" flat>
<v-card-title primary class="title hidden-xs">
<div class="center">
<h3 class="display-1 mb-0">Robot Dashboard</h3>
<div class="title">
Demande d'ouverture du serial port <v-btn @click="manageSerial" :disabled="!tcpState" color="primary" flat slot="activator"><div v-if="!serialState">Ouverture Serial</div><div v-else>Fermeture Serial</div></v-btn>
</div>
<div class="title">
Faire changer le robot d'état
<v-menu :disabled="!serialState" offset-y>
<v-btn :disabled="!serialState" color="primary" flat slot="activator">RUN ou IDLE</v-btn>
<v-list>
<v-list-tile @click="startWithWD">
<v-list-tile-title> Demarer avec watchdog </v-list-tile-title>
</v-list-tile>
<v-list-tile @click="startWithoutWD">
<v-list-tile-title> Demarer sans watchdog </v-list-tile-title>
</v-list-tile>
<v-list-tile @click="stopIdle">
<v-list-tile-title> Robot à l'état IDLE </v-list-tile-title>
</v-list-tile>
</v-list>
</v-menu>
</div>
</div>
</v-card-title>
<Controller v-if="dumbyStarted"/>
</v-card>
</template>
<script>
import Voyant from './Voyant'
import Controller from './Controller'
export default {
components:{
Controller,
},
data:()=>{
return {dumbyStarted:false}
},
props:['tcpState', 'serialState'],
methods:{
manageSerial: function(state){
if(this.tcpState){
this.$socket.emit('openSerial',!this.serialState);
}
else{
this.serialState = false;
}
if(state !== undefined){
this.serialState = state;
}
},
startWithWD: function(){
this.$socket.emit('startWithWD');
},
startWithoutWD: function(){
this.$socket.emit('startWitouthWD');
},
stopIdle: function(){
this.$socket.emit('idle');
}
},
sockets:{
dumbyStart:function(state){
if(this.serialState === true)
this.dumbyStarted=state;
else this.dumbyStarted=false;
},
lostSerial: function(){
this.dumbyStarted = false;
this.serialState = false;
},
},
watch:{
serialState: function(){
if(this.serialState===false){
this.dumbyStarted =false;
this.manageSerial(false);
}
},
}
}
</script>
<style>
.center{
text-align: center;
width: 100%;
}
</style>

View file

@ -1,17 +0,0 @@
<template>
<v-footer class="pa-3" color="pink darken-3">
<div style="color:white;">L.Senaneuch</div>
<v-spacer></v-spacer>
<img class="logo-vue" src="static/logo.png" alt="logo-vue">
<img class="logo-vue" src="static/logo-node.png" alt="logo-node">
<v-spacer></v-spacer>
<div style="color:white;">© INSA - Toulouse {{ new Date().getFullYear() }}</div>
</v-footer>
</template>
<style>
.logo-vue{
width: 30px;
margin-left:15px;
}
</style>

View file

@ -1,18 +0,0 @@
<template>
<div class="loading">
<v-progress-circular indeterminate v-bind:size="70" v-bind:width="7" color="purple"></v-progress-circular>
<h1>Non Connecté ! Veuillez vérifier que le serveur node a bien été lancé. Puis rafraichissez la page !</h1>
</div>
</template>
<style>
.loading{
padding-top: 10%;
position:fixed;
z-index: 10;
width:100%;
height: 100%;
background-color: rgb(46, 37, 37);
color: rgba(255, 255, 255, 0.788);
}
</style>

View file

@ -1,155 +0,0 @@
<template>
<v-toolbar dark color="pink darken-3">
<v-toolbar-title class="white-text hidden-sm-and-down">Dumby User Interface</v-toolbar-title>
<v-menu :nudge-width="100">
<img class="logo" id="logo-connection" src="static/logo_connection.svg" slot="activator">
<v-list>
<v-list-tile @click="tcpManageRq">
<v-list-tile-title> <div v-if="!tcpState">Connexion au Superviseur</div> <div v-else>Deconnection au Superviseur</div></v-list-tile-title>
</v-list-tile>
<v-list-tile :disabled="!tcpState" @click="manageSerial" class="hidden-sm-and-up">
<v-list-tile-title> <div v-if="!serialState"> Connexion au Robot</div> <div v-else> Deconnexion au Robot </div></v-list-tile-title>
</v-list-tile>
</v-list>
</v-menu>
<v-menu :nudge-width="100" class="hidden-sm-and-up">
<img class="logo" id="logo-robot" src="static/logo_dumby_white.svg" slot="activator">
<v-list>
<v-list-tile :disabled="!serialState" @click="runWithWDRq">
<v-list-tile-title>Demarrer avec Watchdog</v-list-tile-title>
</v-list-tile>
<v-list-tile :disabled="!serialState" @click="runWithoutWDRq">
<v-list-tile-title> Demarrer Sans Watchdog</v-list-tile-title>
</v-list-tile>
<v-list-tile :disabled="!serialState" @click="idleDumby">
<v-list-tile-title> Stoper le robot</v-list-tile-title>
</v-list-tile>
</v-list>
</v-menu>
<v-menu :nudge-width="100" class="hidden-sm-and-up">
<v-icon class="logo" slot="activator">camera_alt </v-icon>
<v-list>
<v-list-tile :disabled="!tcpState" @click="manageCamera">
<v-list-tile-title>Activer / Désactiver Camera</v-list-tile-title>
</v-list-tile>
<v-list-tile :disabled="!tcpState" @click="arenaDetectionRq">
<v-list-tile-title>Detection Arene</v-list-tile-title>
</v-list-tile>
</v-list>
</v-menu>
<v-spacer></v-spacer>
<v-tooltip>
<Voyant id="led-connection" slot="activator" :ledOn="tcpState"/>
<span>Etat de connection au Superviseur</span>
</v-tooltip>
<v-tooltip>
<img id="logo-battery" :src="batterie_src" slot="activator" alt="">
<span>Niveau de batterie</span>
</v-tooltip>
</v-toolbar>
</template>
<script>
import Voyant from './Voyant'
export default {
components:{
Voyant,
},
props:['tcpState', 'serialState'],
data:()=>{
return{
robotRun: false,
battery: 0,
batterie_src : '',
}
},
sockets:{
BAT: function(data){
this.battery = parseInt(data);
/* if(data === '2'){
this.batterie_src = "static/battery_full_white.svg";
}else if (data === '1'){
this.batterie_src = "static/battery_medium_white.svg";
}else{
this.batterie_src = "static/battery_low_white.svg";
}*/
},
robotState:function(data){
}
},
watch: {
battery: function(){
switch (this.battery) {
case 0:
this.batterie_src = "static/battery_low_white.svg";
break;
case 1:
this.batterie_src = "static/battery_medium_white.svg";
break;
case 2:
this.batterie_src = "static/battery_full_white.svg";
break;
default:
this.batterie_src= ""
break;
}
}
},
methods:{
tcpManageRq: function(){
if(this.tcpState==false){
this.$socket.emit('askConnection');
console.log('demande de connection');
}
else{
this.$socket.emit('askDisconnection');
}
},
manageSerial: function(){
if(this.tcpState){
this.$socket.emit('openSerial',!this.serialState);
}
},
runWithWDRq: function(){
},
runWithoutWDRq: function(){
},
idleDumby: function(){
},
manageCamera: function(){
},
arenaDetectionRq: function(){
}
}
}
</script>
<style>
.logo{
margin-left:12px;
}
#logo-robot{
width: 35px;
margin-top:7px;
margin-left:16px;
}
#logo-connection{
width: 16px;
margin-top:5px;
margin-left:30px;
}
#logo-battery{
width:50px;
margin-left: 30px;
}
#led-connection{
width:20px;
height: 20px;
padding-left:10px;
margin-left:10px;
}
</style>

View file

@ -1,33 +0,0 @@
<template>
<div>
<v-alert icon="info" v-for="(notify, index) in list" :id="index" :key="index"
:color="notify.type" value="true" transition="slide-y-transition" @click="deleteNotes">
{{notify.msg}}
</v-alert>
</div>
</template>
<script>
export default {
data:()=>{
return {
list:[],
}
},
sockets:{
notifications(data){
this.list.push(data);
}
},
methods:{
deleteNotes(e){
const noteSelected = e.target.parentElement.id;
this.list = this.list.filter((info, index) => noteSelected != index);
}
}
}
</script>
<style>
</style>

View file

@ -1,169 +0,0 @@
<template>
<v-card>
<img draggable="false" id="video" @click="sendPos" :src="source" alt="Flux Video">
<p id="fps"></p>
<v-card-actions>
<div v-if="!detectionMode">
<v-btn @click="manageCamera" :disabled="!tcpState" flat color="orange"> <div v-if="!cameraActive">Activer Camera</div> <div v-else>Désactiver Camera</div> </v-btn>
<v-btn @click="askArena" :disabled="!cameraActive" flat color="orange">Detection Arene</v-btn>
<v-btn @click="displayPos" :disabled="!cameraActive" flat color="orange"><div v-if="!positionMode">Afficher la position</div> <div v-else>Ne plus afficher la position</div> </v-btn>
</div>
<div v-else>
<v-btn @click="confirmArena" :disabled="!cameraActive" flat color="orange">L'arene me plait</v-btn>
<v-btn @click="infirmArena" :disabled="!cameraActive" flat color="orange">L'arene ne me plait pas</v-btn>
</div>
<div v-if="positionMode" class="subheadingfont position_place">
<span v-if="positionMode"> Position : {{robot.x}}, {{robot.y}}</span>
</div>
<div v-if="positionMode && this.cursor.x !== null" class="subheadingfont position_place">
<span> Ordre : {{cursor.x}}, {{cursor.y}}</span>
</div>
</v-card-actions>
</v-card>
</template>
<script>
export default {
props:['tcpState'],
data:()=>{
return{
source:'/static/neige.jpg',
fps:1,
cameraActive: false,
positionState: false,
detectionMode: false,
positionMode: false,
robot:{x: -1,y: -1},
cursor:{x: null, y: null},
}
},
methods:{
hexToBase64 : function(data){
return btoa(String.fromCharCode.apply(null, data.replace(/\r|\n/g, "").replace(/([\da-fA-F]{2}) ?/g, "0x$1 ").replace(/ +$/, "").split(" ")));
},
manageCamera: function(){
if(this.tcpState === true)
this.$socket.emit('camera', !this.cameraActive);
},
askArena: function(){
if(this.cameraActive === true)
this.$socket.emit('arena', 'ask');
this.detectionMode = true;
},
displayPos:function(){
if(this.cameraActive === true){
this.$socket.emit('displayPos', !positionMode);
this.positionMode= !this.positionMode;
}
},
confirmArena: function(){
if(this.cameraActive === true){
this.$socket.emit('arena', 'ok');
this.detectionMode = false;
}
},
infirmArena: function(){
if(this.cameraActive === true){
this.$socket.emit('arena', 'nok');
this.detectionMode = false;
}
},
displayPos : function(){
if(this.cameraActive === true){
this.$socket.emit('displayPos', !this.positionMode);
this.positionMode = !this.positionMode;
}
},
sendPos: function(e){
if(this.positionMode === true){
let rect = document.getElementById('video').getBoundingClientRect();
let robotX = (e.pageX - rect.x)|0, robotY=e.pageY - rect.y;
this.cursor.x = parseInt((480/rect.width)*robotX);
this.cursor.y = parseInt((360/rect.height)*robotY);
this.$socket.emit('sendPos', this.cursor);
}
}
},
sockets:{
IMG: function(data){
if(this.cameraActive){
let frame;
this.source = "data:image/jpeg;base64,";
this.source += this.hexToBase64(data);
//frame = document.getElementById("video");
//frame.src = this.source;
this.fps++;
}
},
POS: function(data){
let a = data.substr(11);
a = a.split(';');
let x = Number(a[0]);
let y = a[1].split('|');
y = Number(y[0]);
let robot2 = {
x,
y
}
this.robot = robot2;
},
cameraState: function(data){
this.cameraActive = data;
},
detectionError: function(){
this.detectionMode=false;
}
},
mounted: function (){
setInterval(function(){
document.getElementById('fps').innerText = `${this.fps} fps`;
this.fps = 0;
}.bind(this), 1000);
},
watch:{
tcpState: function(){
if(this.tcpState == false){
this.cameraActive = false;
this.source ="/static/neige.jpg"
}
}
}
}
</script>
<style>
#fps{
position: absolute;
top:10px;
left:20px;
color:red;
}
#video{
width: 100%;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
}
#video:hover
{
cursor:crosshair;
}
.clikable:hover
{
cursor:pointer;
}
.position_place{
border:solid;
border-color: lightblue;
padding : 10px;
border-width: 1px;
}
</style>

View file

@ -1,28 +0,0 @@
<template>
<div class="led" :class="{light:ledOn}"></div>
</template>
<script>
export default {
props:['ledOn'],
data: ()=>{
return{
light:false,
}
}
}
</script>
<style>
.led{
border-radius: 50%;
background-color: red;
border:solid;
border-width: 2px;
}
.light{
background-color: rgb(0, 255, 0);
}
</style>

View file

@ -1,17 +0,0 @@
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
import App from './App';
import VueSocketio from 'vue-socket.io';
import Vuetify from 'vuetify';
Vue.config.productionTip = false;
Vue.use(Vuetify);
Vue.use(VueSocketio, location.toString());
//Vue.use(VueSocketio, 'localhost:3000 ');
/* eslint-disable no-new */
new Vue({
el: '#app',
components: { App },
template: '<App/>',
});

View file

@ -1,12 +0,0 @@
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}],
"stage-2"
],
"plugins": ["transform-vue-jsx", "transform-runtime"]
}

View file

@ -1,9 +0,0 @@
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

View file

@ -1,6 +0,0 @@
{
"extends": "airbnb-base",
"rules": {
"no-console":"error"
}
}

View file

@ -1,9 +0,0 @@
.DS_Store
node_modules/
/dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files

View file

@ -1,10 +0,0 @@
// https://github.com/michael-ciniawsky/postcss-load-config
module.exports = {
"plugins": {
"postcss-import": {},
"postcss-url": {},
// to edit target browsers: use "browserslist" field in package.json
"autoprefixer": {}
}
}

View file

@ -1,22 +0,0 @@
# dumby-app
> Ce fichier contient uniquement l'environement de developpement de la partie front de dumber. Il a été créer avec webpack.
Lors de la mise en production, seule la partie "dist" a été partagé.
## Build Setup
``` bash
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
```
For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).

View file

@ -1,41 +0,0 @@
'use strict'
require('./check-versions')()
process.env.NODE_ENV = 'production'
const ora = require('ora')
const rm = require('rimraf')
const path = require('path')
const chalk = require('chalk')
const webpack = require('webpack')
const config = require('../config')
const webpackConfig = require('./webpack.prod.conf')
const spinner = ora('building for production...')
spinner.start()
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
if (err) throw err
webpack(webpackConfig, (err, stats) => {
spinner.stop()
if (err) throw err
process.stdout.write(stats.toString({
colors: true,
modules: false,
children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
chunks: false,
chunkModules: false
}) + '\n\n')
if (stats.hasErrors()) {
console.log(chalk.red(' Build failed with errors.\n'))
process.exit(1)
}
console.log(chalk.cyan(' Build complete.\n'))
console.log(chalk.yellow(
' Tip: built files are meant to be served over an HTTP server.\n' +
' Opening index.html over file:// won\'t work.\n'
))
})
})

View file

@ -1,54 +0,0 @@
'use strict'
const chalk = require('chalk')
const semver = require('semver')
const packageConfig = require('../package.json')
const shell = require('shelljs')
function exec (cmd) {
return require('child_process').execSync(cmd).toString().trim()
}
const versionRequirements = [
{
name: 'node',
currentVersion: semver.clean(process.version),
versionRequirement: packageConfig.engines.node
}
]
if (shell.which('npm')) {
versionRequirements.push({
name: 'npm',
currentVersion: exec('npm --version'),
versionRequirement: packageConfig.engines.npm
})
}
module.exports = function () {
const warnings = []
for (let i = 0; i < versionRequirements.length; i++) {
const mod = versionRequirements[i]
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
warnings.push(mod.name + ': ' +
chalk.red(mod.currentVersion) + ' should be ' +
chalk.green(mod.versionRequirement)
)
}
}
if (warnings.length) {
console.log('')
console.log(chalk.yellow('To use this template, you must update following to modules:'))
console.log()
for (let i = 0; i < warnings.length; i++) {
const warning = warnings[i]
console.log(' ' + warning)
}
console.log()
process.exit(1)
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

View file

@ -1,101 +0,0 @@
'use strict'
const path = require('path')
const config = require('../config')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const packageConfig = require('../package.json')
exports.assetsPath = function (_path) {
const assetsSubDirectory = process.env.NODE_ENV === 'production'
? config.build.assetsSubDirectory
: config.dev.assetsSubDirectory
return path.posix.join(assetsSubDirectory, _path)
}
exports.cssLoaders = function (options) {
options = options || {}
const cssLoader = {
loader: 'css-loader',
options: {
sourceMap: options.sourceMap
}
}
const postcssLoader = {
loader: 'postcss-loader',
options: {
sourceMap: options.sourceMap
}
}
// generate loader string to be used with extract text plugin
function generateLoaders (loader, loaderOptions) {
const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
if (loader) {
loaders.push({
loader: loader + '-loader',
options: Object.assign({}, loaderOptions, {
sourceMap: options.sourceMap
})
})
}
// Extract CSS when that option is specified
// (which is the case during production build)
if (options.extract) {
return ExtractTextPlugin.extract({
use: loaders,
fallback: 'vue-style-loader'
})
} else {
return ['vue-style-loader'].concat(loaders)
}
}
// https://vue-loader.vuejs.org/en/configurations/extract-css.html
return {
css: generateLoaders(),
postcss: generateLoaders(),
less: generateLoaders('less'),
sass: generateLoaders('sass', { indentedSyntax: true }),
scss: generateLoaders('sass'),
stylus: generateLoaders('stylus'),
styl: generateLoaders('stylus')
}
}
// Generate loaders for standalone style files (outside of .vue)
exports.styleLoaders = function (options) {
const output = []
const loaders = exports.cssLoaders(options)
for (const extension in loaders) {
const loader = loaders[extension]
output.push({
test: new RegExp('\\.' + extension + '$'),
use: loader
})
}
return output
}
exports.createNotifierCallback = () => {
const notifier = require('node-notifier')
return (severity, errors) => {
if (severity !== 'error') return
const error = errors[0]
const filename = error.file && error.file.split('!').pop()
notifier.notify({
title: packageConfig.name,
message: severity + ': ' + error.name,
subtitle: filename || '',
icon: path.join(__dirname, 'logo.png')
})
}
}

View file

@ -1,22 +0,0 @@
'use strict'
const utils = require('./utils')
const config = require('../config')
const isProduction = process.env.NODE_ENV === 'production'
const sourceMapEnabled = isProduction
? config.build.productionSourceMap
: config.dev.cssSourceMap
module.exports = {
loaders: utils.cssLoaders({
sourceMap: sourceMapEnabled,
extract: isProduction
}),
cssSourceMap: sourceMapEnabled,
cacheBusting: config.dev.cacheBusting,
transformToRequire: {
video: ['src', 'poster'],
source: 'src',
img: 'src',
image: 'xlink:href'
}
}

View file

@ -1,82 +0,0 @@
'use strict'
const path = require('path')
const utils = require('./utils')
const config = require('../config')
const vueLoaderConfig = require('./vue-loader.conf')
function resolve (dir) {
return path.join(__dirname, '..', dir)
}
module.exports = {
context: path.resolve(__dirname, '../'),
entry: {
app: './src/main.js'
},
output: {
path: config.build.assetsRoot,
filename: '[name].js',
publicPath: process.env.NODE_ENV === 'production'
? config.build.assetsPublicPath
: config.dev.assetsPublicPath
},
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': resolve('src'),
}
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
options: vueLoaderConfig
},
{
test: /\.js$/,
loader: 'babel-loader',
include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')]
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]')
}
},
{
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('media/[name].[hash:7].[ext]')
}
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
}
]
},
node: {
// prevent webpack from injecting useless setImmediate polyfill because Vue
// source contains it (although only uses it if it's native).
setImmediate: false,
// prevent webpack from injecting mocks to Node native modules
// that does not make sense for the client
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
child_process: 'empty'
}
}

View file

@ -1,95 +0,0 @@
'use strict'
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const path = require('path')
const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
const portfinder = require('portfinder')
const HOST = process.env.HOST
const PORT = process.env.PORT && Number(process.env.PORT)
const devWebpackConfig = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
},
// cheap-module-eval-source-map is faster for development
devtool: config.dev.devtool,
// these devServer options should be customized in /config/index.js
devServer: {
clientLogLevel: 'warning',
historyApiFallback: {
rewrites: [
{ from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
],
},
hot: true,
contentBase: false, // since we use CopyWebpackPlugin.
compress: true,
host: HOST || config.dev.host,
port: PORT || config.dev.port,
open: config.dev.autoOpenBrowser,
overlay: config.dev.errorOverlay
? { warnings: false, errors: true }
: false,
publicPath: config.dev.assetsPublicPath,
proxy: config.dev.proxyTable,
quiet: true, // necessary for FriendlyErrorsPlugin
watchOptions: {
poll: config.dev.poll,
}
},
plugins: [
new webpack.DefinePlugin({
'process.env': require('../config/dev.env')
}),
new webpack.HotModuleReplacementPlugin(),
new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
new webpack.NoEmitOnErrorsPlugin(),
// https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true
}),
// copy custom static assets
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.dev.assetsSubDirectory,
ignore: ['.*']
}
])
]
})
module.exports = new Promise((resolve, reject) => {
portfinder.basePort = process.env.PORT || config.dev.port
portfinder.getPort((err, port) => {
if (err) {
reject(err)
} else {
// publish the new Port, necessary for e2e tests
process.env.PORT = port
// add port to devServer config
devWebpackConfig.devServer.port = port
// Add FriendlyErrorsPlugin
devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
compilationSuccessInfo: {
messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
},
onErrors: config.dev.notifyOnErrors
? utils.createNotifierCallback()
: undefined
}))
resolve(devWebpackConfig)
}
})
})

View file

@ -1,145 +0,0 @@
'use strict'
const path = require('path')
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const env = require('../config/prod.env')
const webpackConfig = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({
sourceMap: config.build.productionSourceMap,
extract: true,
usePostCSS: true
})
},
devtool: config.build.productionSourceMap ? config.build.devtool : false,
output: {
path: config.build.assetsRoot,
filename: utils.assetsPath('js/[name].[chunkhash].js'),
chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
},
plugins: [
// http://vuejs.github.io/vue-loader/en/workflow/production.html
new webpack.DefinePlugin({
'process.env': env
}),
new UglifyJsPlugin({
uglifyOptions: {
compress: {
warnings: false
}
},
sourceMap: config.build.productionSourceMap,
parallel: true
}),
// extract css into its own file
new ExtractTextPlugin({
filename: utils.assetsPath('css/[name].[contenthash].css'),
// Setting the following option to `false` will not extract CSS from codesplit chunks.
// Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
// It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`,
// increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
allChunks: true,
}),
// Compress extracted CSS. We are using this plugin so that possible
// duplicated CSS from different components can be deduped.
new OptimizeCSSPlugin({
cssProcessorOptions: config.build.productionSourceMap
? { safe: true, map: { inline: false } }
: { safe: true }
}),
// generate dist index.html with correct asset hash for caching.
// you can customize output by editing /index.html
// see https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: config.build.index,
template: 'index.html',
inject: true,
minify: {
removeComments: true,
collapseWhitespace: true,
removeAttributeQuotes: true
// more options:
// https://github.com/kangax/html-minifier#options-quick-reference
},
// necessary to consistently work with multiple chunks via CommonsChunkPlugin
chunksSortMode: 'dependency'
}),
// keep module.id stable when vendor modules does not change
new webpack.HashedModuleIdsPlugin(),
// enable scope hoisting
new webpack.optimize.ModuleConcatenationPlugin(),
// split vendor js into its own file
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks (module) {
// any required modules inside node_modules are extracted to vendor
return (
module.resource &&
/\.js$/.test(module.resource) &&
module.resource.indexOf(
path.join(__dirname, '../node_modules')
) === 0
)
}
}),
// extract webpack runtime and module manifest to its own file in order to
// prevent vendor hash from being updated whenever app bundle is updated
new webpack.optimize.CommonsChunkPlugin({
name: 'manifest',
minChunks: Infinity
}),
// This instance extracts shared chunks from code splitted chunks and bundles them
// in a separate chunk, similar to the vendor chunk
// see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
new webpack.optimize.CommonsChunkPlugin({
name: 'app',
async: 'vendor-async',
children: true,
minChunks: 3
}),
// copy custom static assets
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.build.assetsSubDirectory,
ignore: ['.*']
}
])
]
})
if (config.build.productionGzip) {
const CompressionWebpackPlugin = require('compression-webpack-plugin')
webpackConfig.plugins.push(
new CompressionWebpackPlugin({
asset: '[path].gz[query]',
algorithm: 'gzip',
test: new RegExp(
'\\.(' +
config.build.productionGzipExtensions.join('|') +
')$'
),
threshold: 10240,
minRatio: 0.8
})
)
}
if (config.build.bundleAnalyzerReport) {
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
webpackConfig.plugins.push(new BundleAnalyzerPlugin())
}
module.exports = webpackConfig

View file

@ -1,7 +0,0 @@
'use strict'
const merge = require('webpack-merge')
const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"'
})

View file

@ -1,69 +0,0 @@
'use strict'
// Template version: 1.3.1
// see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path')
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {},
// Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
/**
* Source Maps
*/
// https://webpack.js.org/configuration/devtool/#development
devtool: 'cheap-module-eval-source-map',
// If you have problems debugging vue-files in devtools,
// set this to false - it *may* help
// https://vue-loader.vuejs.org/en/options.html#cachebusting
cacheBusting: true,
cssSourceMap: true
},
build: {
// Template for index.html
index: path.resolve(__dirname, '../dist/index.html'),
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/',
/**
* Source Maps
*/
productionSourceMap: true,
// https://webpack.js.org/configuration/devtool/#production
devtool: '#source-map',
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
// Run the build command with an extra argument to
// View the bundle analyzer report after build finishes:
// `npm run build --report`
// Set to `true` or `false` to always turn it on or off
bundleAnalyzerReport: process.env.npm_config_report
}
}

View file

@ -1,4 +0,0 @@
'use strict'
module.exports = {
NODE_ENV: '"production"'
}

View file

@ -1,31 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.13/components/icon.min.css">-->
<link href='https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons' rel="stylesheet">
<link href="https://unpkg.com/vuetify/dist/vuetify.min.css" rel="stylesheet">
<style>
img{
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
}
html{
width: 100%;
height: 100%;
}
</style>
<title>Dumby User Interface</title>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

File diff suppressed because it is too large Load diff

View file

@ -1,66 +0,0 @@
{
"name": "dumby-app",
"version": "1.0.0",
"description": "A Vue.js project",
"author": "L.Senaneuch",
"private": true,
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev",
"build": "node build/build.js"
},
"dependencies": {
"eslint": "^4.17.0",
"vue": "^2.5.2",
"vue-socket.io": "^2.1.1-b",
"vuetify": "^0.17.7"
},
"devDependencies": {
"autoprefixer": "^7.1.2",
"babel-core": "^6.22.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^7.1.1",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-plugin-transform-vue-jsx": "^3.5.0",
"babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0",
"chalk": "^2.0.1",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.0",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-plugin-import": "^2.8.0",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.4",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1",
"node-notifier": "^5.1.2",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.2.0",
"portfinder": "^1.0.13",
"postcss-import": "^11.0.0",
"postcss-loader": "^2.0.8",
"postcss-url": "^7.2.1",
"rimraf": "^2.6.0",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"uglifyjs-webpack-plugin": "^1.1.1",
"url-loader": "^0.5.8",
"vue-loader": "^13.3.0",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.5.2",
"webpack": "^3.6.0",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-server": "^2.9.1",
"webpack-merge": "^4.1.0"
},
"engines": {
"node": ">= 6.0.0",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}

View file

@ -1,96 +0,0 @@
<template>
<div id="app">
<v-app v-if="wsConnected">
<NotesList class="notif"/>
<v-container grid-list-md>
<Navbar :tcpState="tcpConnected" :serialState="serialOpened"/>
<v-layout row wrap>
<v-flex d-flex xs12 sm6 md6>
<Video :tcpState="tcpConnected"/>
</v-flex>
<v-flex d-flex xs12 sm6 md6>
<v-layout row wrap xs12>
<v-flex d-flex>
<Dashboard :tcpState="tcpConnected" :serialState="serialOpened"/>
</v-flex>
</v-layout>
</v-flex>
<v-flex d-flex xs12 sm12 md12 class="hidden-sm-and-down">
<Console :tcpState="tcpConnected" :serialState="serialOpened"/>
</v-flex>
</v-layout>
<FooterBar/>
</v-container>
</v-app>
<v-app v-else>
<Loading class="center"/>
</v-app>
</div>
</template>
<script>
import NotesList from './components/NotificationList'
import Console from './components/Console'
import Controller from './components/Controller'
import FooterBar from './components/Footerbar'
import Navbar from './components/MyNavbar'
import Video from './components/Video'
import Loading from './components/LoadingScreen'
import Dashboard from './components/DashBoard'
export default {
name: 'App',
data:()=>{
return{
wsConnected: false,
tcpConnected:false,
serialOpened:false,
}
},
components: {
NotesList,
Console,
Controller,
Navbar,
FooterBar,
Video,
Loading,
Dashboard,
},
sockets:{
connect: function(){
return this.wsConnected=true;
},
disconnect: function(){
this.wsConnected=false;
this.tcpConnected = false;
this.tcpSerial = false;
},
superViseurConnection: function(state){
if(typeof(state) === 'boolean')
this.tcpConnected = state;
if(state === false)
this.serialOpened = false;
},
serialOpen: function(state){
if(typeof(state) === 'boolean')
this.serialOpened = state;
}
},
}
</script>
<style>
.notif{
margin-left: 50%;
transform: translate(-50%);
position: absolute;
z-index: 10;
}
.center{
text-align: center;
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 364 KiB

View file

@ -1,66 +0,0 @@
<template>
<div>
<v-layout row wrap>
<v-flex d-flex xs12>
<div id="console-input" class="ui fluid consoleMes"></div>
</v-flex>
<v-flex d-flex xs12>
<v-text-field :disabled="!tcpState" @keyup.enter="consoleOut" label="Envoi Message Console" v-model="output"> </v-text-field>
<v-btn :disabled="!tcpState" icon @click="consoleOut" color="primary" dark><v-icon>send</v-icon></v-btn>
</v-flex>
</v-layout>
</div>
</template>
<script>
export default {
props:['tcpState', 'serialState'],
data:()=>{
return {
output: '',
}
},
sockets:{
consoleIn(message){
if(this.tcpState === true){
let balise = document.createElement('div');
balise.textContent = message;
let console = document.getElementById('console-input').prepend(balise);
}
}
},
methods:{
consoleOut(){
if(this.output !==''){
this.$socket.emit('console-out',this.output.replace(/\s/g, ""));
this.output = '';
}
}
}
}
</script>
<style>
.consoleMes{
text-align: left;
border:solid;
border-width:1px;
border-color:lightgray;
border-radius:5px;
padding-left: 10px;
padding-top:20px;
padding-bottom:20px;
color:white;
background-color:rgb(36, 29, 29);
font: 0.8em 'Andale Mono', Consolas, 'Courier New';
font-weight: bold;
font-size: 1.1em;
min-height: 100px;
overflow-y: scroll;
}
#console-input{
max-height: 300px;
}
</style>

View file

@ -1,103 +0,0 @@
<template>
<div class="command">
<img id="up" src="/static/arrow-up.svg" class="direction" v-bind:class="{touched: keyup}">
<div>
<img id="left" src="/static/arrow-left.svg" class="direction" v-bind:class="{touched: keyleft}">
<img id="down" src="/static/arrow-down.svg" class="direction" v-bind:class="{touched: keydown}">
<img id="right" src="/static/arrow-right.svg" class="direction" v-bind:class="{touched: keyright}">
</div>
</div>
</template>
<script>
export default {
data:()=>{
return {
keyup: false, //38
keydown: false, // 40
keyleft:false, // 37
keyright:false // 39
}
},
mounted:function(){
window.addEventListener('keydown', (event)=> {
if (event.keyCode == 37) {
this.keyleft= true;
}
if (event.keyCode == 38) {
this.keyup=true;
}
if (event.keyCode == 39) {
this.keyright=true;
}
if (event.keyCode == 40) {
this.keydown=true;
}
});
window.addEventListener('keyup', (event)=> {
if (event.keyCode == 37 ) {
this.keyleft=false;
}
if (event.keyCode == 38 ) {
this.keyup=false;
}
if (event.keyCode == 39 ) {
this.keyright=false;
}
if (event.keyCode == 40 ) {
this.keydown=false;
}
});
},
watch:{
keyup:function(){
if(this.keyup===true){
this.$socket.emit('MOVEFORWARD');
}
else{
this.$socket.emit('MOVESTOP');
}
},
keyleft:function(){
if(this.keyleft===true){
this.$socket.emit('MOVERIGHT');
}
else{
this.$socket.emit('MOVESTOP');
}
},
keydown:function(){
if(this.keydown===true){
this.$socket.emit('MOVEBACK');
}
else{
this.$socket.emit('MOVESTOP');
}
},
keyright:function(){
if(this.keyright===true){
this.$socket.emit('MOVELEFT');
}
else{
this.$socket.emit('MOVESTOP');
}
},
}
}
</script>
<style>
.direction{
border:solid;
border-color:lightgray;
border-width: 1px;
border-radius: 50%;
}
.touched{
background-color:lightblue;
}
.command{
text-align: center;
}
</style>

View file

@ -1,95 +0,0 @@
<template>
<v-card color="grey lighten-4" flat>
<v-card-title primary class="title hidden-xs">
<div class="center">
<h3 class="display-1 mb-0">Robot Dashboard</h3>
<div class="title">
Demande d'ouverture du serial port <v-btn @click="manageSerial" :disabled="!tcpState" color="primary" flat slot="activator"><div v-if="!serialState">Ouverture Serial</div><div v-else>Fermeture Serial</div></v-btn>
</div>
<div class="title">
Faire changer le robot d'état
<v-menu :disabled="!serialState" offset-y>
<v-btn :disabled="!serialState" color="primary" flat slot="activator">RUN ou IDLE</v-btn>
<v-list>
<v-list-tile @click="startWithWD">
<v-list-tile-title> Demarer avec watchdog </v-list-tile-title>
</v-list-tile>
<v-list-tile @click="startWithoutWD">
<v-list-tile-title> Demarer sans watchdog </v-list-tile-title>
</v-list-tile>
<v-list-tile @click="stopIdle">
<v-list-tile-title> Robot à l'état IDLE </v-list-tile-title>
</v-list-tile>
</v-list>
</v-menu>
</div>
</div>
</v-card-title>
<Controller v-if="dumbyStarted"/>
</v-card>
</template>
<script>
import Voyant from './Voyant'
import Controller from './Controller'
export default {
components:{
Controller,
},
data:()=>{
return {dumbyStarted:false}
},
props:['tcpState', 'serialState'],
methods:{
manageSerial: function(state){
if(this.tcpState){
this.$socket.emit('openSerial',!this.serialState);
}
else{
this.serialState = false;
}
if(state !== undefined){
this.serialState = state;
}
},
startWithWD: function(){
this.$socket.emit('startWithWD');
},
startWithoutWD: function(){
this.$socket.emit('startWitouthWD');
},
stopIdle: function(){
this.$socket.emit('idle');
}
},
sockets:{
dumbyStart:function(state){
if(this.serialState === true)
this.dumbyStarted=state;
else this.dumbyStarted=false;
},
lostSerial: function(){
this.dumbyStarted = false;
this.serialState = false;
},
},
watch:{
serialState: function(){
if(this.serialState===false){
this.dumbyStarted =false;
this.manageSerial(false);
}
},
}
}
</script>
<style>
.center{
text-align: center;
width: 100%;
}
</style>

View file

@ -1,17 +0,0 @@
<template>
<v-footer class="pa-3" color="pink darken-3">
<div style="color:white;">L.Senaneuch</div>
<v-spacer></v-spacer>
<img class="logo-vue" src="static/logo.png" alt="logo-vue">
<img class="logo-vue" src="static/logo-node.png" alt="logo-node">
<v-spacer></v-spacer>
<div style="color:white;">© INSA - Toulouse {{ new Date().getFullYear() }}</div>
</v-footer>
</template>
<style>
.logo-vue{
width: 30px;
margin-left:15px;
}
</style>

View file

@ -1,18 +0,0 @@
<template>
<div class="loading">
<v-progress-circular indeterminate v-bind:size="70" v-bind:width="7" color="purple"></v-progress-circular>
<h1>Non Connecté ! Veuillez vérifier que le serveur node a bien été lancé. Puis rafraichissez la page !</h1>
</div>
</template>
<style>
.loading{
padding-top: 10%;
position:fixed;
z-index: 10;
width:100%;
height: 100%;
background-color: rgb(46, 37, 37);
color: rgba(255, 255, 255, 0.788);
}
</style>

View file

@ -1,155 +0,0 @@
<template>
<v-toolbar dark color="pink darken-3">
<v-toolbar-title class="white-text hidden-sm-and-down">Dumby User Interface</v-toolbar-title>
<v-menu :nudge-width="100">
<img class="logo" id="logo-connection" src="static/logo_connection.svg" slot="activator">
<v-list>
<v-list-tile @click="tcpManageRq">
<v-list-tile-title> <div v-if="!tcpState">Connexion au Superviseur</div> <div v-else>Deconnection au Superviseur</div></v-list-tile-title>
</v-list-tile>
<v-list-tile :disabled="!tcpState" @click="manageSerial" class="hidden-sm-and-up">
<v-list-tile-title> <div v-if="!serialState"> Connexion au Robot</div> <div v-else> Deconnexion au Robot </div></v-list-tile-title>
</v-list-tile>
</v-list>
</v-menu>
<v-menu :nudge-width="100" class="hidden-sm-and-up">
<img class="logo" id="logo-robot" src="static/logo_dumby_white.svg" slot="activator">
<v-list>
<v-list-tile :disabled="!serialState" @click="runWithWDRq">
<v-list-tile-title>Demarrer avec Watchdog</v-list-tile-title>
</v-list-tile>
<v-list-tile :disabled="!serialState" @click="runWithoutWDRq">
<v-list-tile-title> Demarrer Sans Watchdog</v-list-tile-title>
</v-list-tile>
<v-list-tile :disabled="!serialState" @click="idleDumby">
<v-list-tile-title> Stoper le robot</v-list-tile-title>
</v-list-tile>
</v-list>
</v-menu>
<v-menu :nudge-width="100" class="hidden-sm-and-up">
<v-icon class="logo" slot="activator">camera_alt </v-icon>
<v-list>
<v-list-tile :disabled="!tcpState" @click="manageCamera">
<v-list-tile-title>Activer / Désactiver Camera</v-list-tile-title>
</v-list-tile>
<v-list-tile :disabled="!tcpState" @click="arenaDetectionRq">
<v-list-tile-title>Detection Arene</v-list-tile-title>
</v-list-tile>
</v-list>
</v-menu>
<v-spacer></v-spacer>
<v-tooltip>
<Voyant id="led-connection" slot="activator" :ledOn="tcpState"/>
<span>Etat de connection au Superviseur</span>
</v-tooltip>
<v-tooltip>
<img id="logo-battery" :src="batterie_src" slot="activator" alt="">
<span>Niveau de batterie</span>
</v-tooltip>
</v-toolbar>
</template>
<script>
import Voyant from './Voyant'
export default {
components:{
Voyant,
},
props:['tcpState', 'serialState'],
data:()=>{
return{
robotRun: false,
battery: 0,
batterie_src : '',
}
},
sockets:{
BAT: function(data){
this.battery = parseInt(data);
/* if(data === '2'){
this.batterie_src = "static/battery_full_white.svg";
}else if (data === '1'){
this.batterie_src = "static/battery_medium_white.svg";
}else{
this.batterie_src = "static/battery_low_white.svg";
}*/
},
robotState:function(data){
}
},
watch: {
battery: function(){
switch (this.battery) {
case 0:
this.batterie_src = "static/battery_low_white.svg";
break;
case 1:
this.batterie_src = "static/battery_medium_white.svg";
break;
case 2:
this.batterie_src = "static/battery_full_white.svg";
break;
default:
this.batterie_src= ""
break;
}
}
},
methods:{
tcpManageRq: function(){
if(this.tcpState==false){
this.$socket.emit('askConnection');
console.log('demande de connection');
}
else{
this.$socket.emit('askDisconnection');
}
},
manageSerial: function(){
if(this.tcpState){
this.$socket.emit('openSerial',!this.serialState);
}
},
runWithWDRq: function(){
},
runWithoutWDRq: function(){
},
idleDumby: function(){
},
manageCamera: function(){
},
arenaDetectionRq: function(){
}
}
}
</script>
<style>
.logo{
margin-left:12px;
}
#logo-robot{
width: 35px;
margin-top:7px;
margin-left:16px;
}
#logo-connection{
width: 16px;
margin-top:5px;
margin-left:30px;
}
#logo-battery{
width:50px;
margin-left: 30px;
}
#led-connection{
width:20px;
height: 20px;
padding-left:10px;
margin-left:10px;
}
</style>

View file

@ -1,33 +0,0 @@
<template>
<div>
<v-alert icon="info" v-for="(notify, index) in list" :id="index" :key="index"
:color="notify.type" value="true" transition="slide-y-transition" @click="deleteNotes">
{{notify.msg}}
</v-alert>
</div>
</template>
<script>
export default {
data:()=>{
return {
list:[],
}
},
sockets:{
notifications(data){
this.list.push(data);
}
},
methods:{
deleteNotes(e){
const noteSelected = e.target.parentElement.id;
this.list = this.list.filter((info, index) => noteSelected != index);
}
}
}
</script>
<style>
</style>

View file

@ -1,169 +0,0 @@
<template>
<v-card>
<img draggable="false" id="video" @click="sendPos" :src="source" alt="Flux Video">
<p id="fps"></p>
<v-card-actions>
<div v-if="!detectionMode">
<v-btn @click="manageCamera" :disabled="!tcpState" flat color="orange"> <div v-if="!cameraActive">Activer Camera</div> <div v-else>Désactiver Camera</div> </v-btn>
<v-btn @click="askArena" :disabled="!cameraActive" flat color="orange">Detection Arene</v-btn>
<v-btn @click="displayPos" :disabled="!cameraActive" flat color="orange"><div v-if="!positionMode">Afficher la position</div> <div v-else>Ne plus afficher la position</div> </v-btn>
</div>
<div v-else>
<v-btn @click="confirmArena" :disabled="!cameraActive" flat color="orange">L'arene me plait</v-btn>
<v-btn @click="infirmArena" :disabled="!cameraActive" flat color="orange">L'arene ne me plait pas</v-btn>
</div>
<div v-if="positionMode" class="subheadingfont position_place">
<span v-if="positionMode"> Position : {{robot.x}}, {{robot.y}}</span>
</div>
<div v-if="positionMode && this.cursor.x !== null" class="subheadingfont position_place">
<span> Ordre : {{cursor.x}}, {{cursor.y}}</span>
</div>
</v-card-actions>
</v-card>
</template>
<script>
export default {
props:['tcpState'],
data:()=>{
return{
source:'/static/neige.jpg',
fps:1,
cameraActive: false,
positionState: false,
detectionMode: false,
positionMode: false,
robot:{x: -1,y: -1},
cursor:{x: null, y: null},
}
},
methods:{
hexToBase64 : function(data){
return btoa(String.fromCharCode.apply(null, data.replace(/\r|\n/g, "").replace(/([\da-fA-F]{2}) ?/g, "0x$1 ").replace(/ +$/, "").split(" ")));
},
manageCamera: function(){
if(this.tcpState === true)
this.$socket.emit('camera', !this.cameraActive);
},
askArena: function(){
if(this.cameraActive === true)
this.$socket.emit('arena', 'ask');
this.detectionMode = true;
},
displayPos:function(){
if(this.cameraActive === true){
this.$socket.emit('displayPos', !positionMode);
this.positionMode= !this.positionMode;
}
},
confirmArena: function(){
if(this.cameraActive === true){
this.$socket.emit('arena', 'ok');
this.detectionMode = false;
}
},
infirmArena: function(){
if(this.cameraActive === true){
this.$socket.emit('arena', 'nok');
this.detectionMode = false;
}
},
displayPos : function(){
if(this.cameraActive === true){
this.$socket.emit('displayPos', !this.positionMode);
this.positionMode = !this.positionMode;
}
},
sendPos: function(e){
if(this.positionMode === true){
let rect = document.getElementById('video').getBoundingClientRect();
let robotX = (e.pageX - rect.x)|0, robotY=e.pageY - rect.y;
this.cursor.x = parseInt((480/rect.width)*robotX);
this.cursor.y = parseInt((360/rect.height)*robotY);
this.$socket.emit('sendPos', this.cursor);
}
}
},
sockets:{
IMG: function(data){
if(this.cameraActive){
let frame;
this.source = "data:image/jpeg;base64,";
this.source += this.hexToBase64(data);
//frame = document.getElementById("video");
//frame.src = this.source;
this.fps++;
}
},
POS: function(data){
let a = data.substr(11);
a = a.split(';');
let x = Number(a[0]);
let y = a[1].split('|');
y = Number(y[0]);
let robot2 = {
x,
y
}
this.robot = robot2;
},
cameraState: function(data){
this.cameraActive = data;
},
detectionError: function(){
this.detectionMode=false;
}
},
mounted: function (){
setInterval(function(){
document.getElementById('fps').innerText = `${this.fps} fps`;
this.fps = 0;
}.bind(this), 1000);
},
watch:{
tcpState: function(){
if(this.tcpState == false){
this.cameraActive = false;
this.source ="/static/neige.jpg"
}
}
}
}
</script>
<style>
#fps{
position: absolute;
top:10px;
left:20px;
color:red;
}
#video{
width: 100%;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
}
#video:hover
{
cursor:crosshair;
}
.clikable:hover
{
cursor:pointer;
}
.position_place{
border:solid;
border-color: lightblue;
padding : 10px;
border-width: 1px;
}
</style>

View file

@ -1,28 +0,0 @@
<template>
<div class="led" :class="{light:ledOn}"></div>
</template>
<script>
export default {
props:['ledOn'],
data: ()=>{
return{
light:false,
}
}
}
</script>
<style>
.led{
border-radius: 50%;
background-color: red;
border:solid;
border-width: 2px;
}
.light{
background-color: rgb(0, 255, 0);
}
</style>

View file

@ -1,17 +0,0 @@
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
import App from './App';
import VueSocketio from 'vue-socket.io';
import Vuetify from 'vuetify';
Vue.config.productionTip = false;
Vue.use(Vuetify);
Vue.use(VueSocketio, location.toString());
//Vue.use(VueSocketio, 'localhost:3000 ');
/* eslint-disable no-new */
new Vue({
el: '#app',
components: { App },
template: '<App/>',
});

View file

@ -1,14 +0,0 @@
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="102" width="102" y="-1" x="-1"/>
<g display="none" overflow="visible" y="0" x="0" height="100%" width="100%" id="canvasGrid">
<rect fill="url(#gridpattern)" stroke-width="0" y="0" x="0" height="100%" width="100%"/>
</g>
</g>
<g>
<title>Layer 1</title>
<path transform="rotate(90, 50, 50.2548)" id="svg_2" d="m53.448662,50.254662l-20.200256,-17.133644l13.303299,0l20.19989,17.133644l-20.19989,17.133873l-13.303299,0l20.200256,-17.133873z" stroke-width="1.5" stroke="#000" fill="#000000"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 740 B

View file

@ -1,14 +0,0 @@
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="102" width="102" y="-1" x="-1"/>
<g display="none" overflow="visible" y="0" x="0" height="100%" width="100%" id="canvasGrid">
<rect fill="url(#gridpattern)" stroke-width="0" y="0" x="0" height="100%" width="100%"/>
</g>
</g>
<g>
<title>Layer 1</title>
<path transform="rotate(180, 50, 50.2548)" id="svg_2" d="m53.448662,50.254662l-20.200256,-17.133644l13.303299,0l20.19989,17.133644l-20.19989,17.133873l-13.303299,0l20.200256,-17.133873z" stroke-width="1.5" stroke="#000" fill="#000000"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 741 B

View file

@ -1,14 +0,0 @@
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="102" width="102" y="-1" x="-1"/>
<g display="none" overflow="visible" y="0" x="0" height="100%" width="100%" id="canvasGrid">
<rect fill="url(#gridpattern)" stroke-width="0" y="0" x="0" height="100%" width="100%"/>
</g>
</g>
<g>
<title>Layer 1</title>
<path id="svg_2" d="m53.448662,49.999886l-20.200256,-17.133644l13.303299,0l20.19989,17.133644l-20.19989,17.133873l-13.303299,0l20.200256,-17.133873z" stroke-width="1.5" stroke="#000" fill="#000000"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 704 B

View file

@ -1,14 +0,0 @@
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="102" width="102" y="-1" x="-1"/>
<g display="none" overflow="visible" y="0" x="0" height="100%" width="100%" id="canvasGrid">
<rect fill="url(#gridpattern)" stroke-width="0" y="0" x="0" height="100%" width="100%"/>
</g>
</g>
<g>
<title>Layer 1</title>
<path transform="rotate(-90, 50, 50)" id="svg_2" d="m53.448662,49.999886l-20.200256,-17.133644l13.303299,0l20.19989,17.133644l-20.19989,17.133873l-13.303299,0l20.200256,-17.133873z" stroke-width="1.5" stroke="#000" fill="#000000"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 736 B

View file

@ -1,15 +0,0 @@
<svg width="88" height="28" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="30" width="90" y="-1" x="-1"/>
</g>
<g>
<title>Layer 1</title>
<rect id="svg_1" height="26.315784" width="81.894718" y="0.999998" x="1" fill-opacity="null" stroke-opacity="null" stroke-width="2" stroke="#4c4c4c" fill="none"/>
<rect id="svg_2" height="20.210522" width="22.736838" y="3.947366" x="4.578944" stroke-opacity="null" stroke-width="2" stroke="#4c4c4c" fill="#4c4c4c"/>
<rect id="svg_5" height="20.210522" width="22.736838" y="3.947366" x="30.789471" stroke-opacity="null" stroke-width="2" stroke="#4c4c4c" fill="#4c4c4c"/>
<rect id="svg_6" height="20.210522" width="22.736838" y="3.947366" x="56.789459" stroke-opacity="null" stroke-width="2" stroke="#4c4c4c" fill="#4c4c4c"/>
<rect id="svg_7" height="5.263157" width="3.999999" y="12.368417" x="82.894717" stroke-opacity="null" stroke-width="2" stroke="#4c4c4c" fill="none"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -1,16 +0,0 @@
<svg width="88" height="28" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect x="-1" y="-1" width="17.714263" height="6.999993" id="canvas_background" fill="none"/>
</g>
<g>
<title>Layer 1</title>
<rect fill="none" stroke="#ffffff" stroke-width="2" fill-opacity="null" x="1" y="0.999998" width="81.894718" height="26.315784" id="svg_1"/>
<rect fill="#ffffff" stroke="#ffffff" stroke-width="2" x="4.578944" y="3.947366" width="22.736838" height="20.210522" id="svg_2"/>
<rect fill="#ffffff" stroke="#ffffff" stroke-width="2" x="30.789471" y="3.947366" width="22.736838" height="20.210522" id="svg_5"/>
<rect fill="#ffffff" stroke="#ffffff" stroke-width="2" x="56.789459" y="3.947366" width="22.736838" height="20.210522" id="svg_6"/>
<rect fill="none" stroke="#ffffff" stroke-width="2" x="82.894717" y="12.368417" width="3.999999" height="5.263157" id="svg_7"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 992 B

View file

@ -1,14 +0,0 @@
<svg width="88" height="28" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="30" width="90" y="-1" x="-1"/>
</g>
<g>
<title>Layer 1</title>
<rect id="svg_1" height="26.315784" width="81.894718" y="0.999998" x="1" fill-opacity="null" stroke-opacity="null" stroke-width="2" stroke="#4c4c4c" fill="none"/>
<rect id="svg_2" height="20.210522" width="8.842102" y="3.947366" x="4.578944" stroke-opacity="null" stroke-width="2" stroke="#4c4c4c" fill="#4c4c4c"/>
<rect id="svg_7" height="5.263157" width="3.999999" y="12.368417" x="82.894717" stroke-opacity="null" stroke-width="2" stroke="#4c4c4c" fill="none"/>
<path id="svg_8" d="m54.798424,20.400599l-2.790161,-4.677445c-0.841221,-1.409811 -2.217152,-3.717751 -3.058323,-5.127771l-2.789875,-4.6774c-0.842064,-1.410675 -2.218014,-1.410675 -3.058952,0l-2.789314,4.6774c-0.841179,1.410021 -2.217922,3.718452 -3.05896,5.127771l-2.789524,4.677445c-0.841179,1.411167 -0.152626,2.56464 1.529472,2.56464l17.274529,0c1.683743,0 2.371479,-1.153473 1.531109,-2.56464l0,0zm-9.371113,0.724201l-1.654819,0l0,-1.538128l1.654819,0l0,1.538128zm-0.079727,-2.671261l-1.493965,0l-0.148476,-6.580343l1.777653,0l-0.135212,6.580343z" fill="#666666"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -1,14 +0,0 @@
<svg width="88" height="28" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="30" width="90" y="-1" x="-1"/>
</g>
<g>
<title>Layer 1</title>
<rect id="svg_1" height="26.315784" width="81.894718" y="0.999998" x="1" stroke-width="2" stroke="#ffffff" fill="none"/>
<rect id="svg_2" height="20.210522" width="8.842102" y="3.947366" x="4.578944" stroke-width="2" stroke="#ffffff" fill="#ffffff"/>
<rect id="svg_7" height="5.263157" width="3.999999" y="12.368417" x="82.894717" stroke-width="2" stroke="#ffffff" fill="none"/>
<path id="svg_9" d="m60.694698,20.577425l-3.23653,-4.731917c-0.975735,-1.426157 -2.571877,-3.761006 -3.5476,-5.187507l-3.236504,-4.731595c-0.976608,-1.427078 -2.572712,-1.427078 -3.547989,0l-3.235592,4.731595c-0.976166,1.4265 -2.573158,3.761847 -3.548439,5.187507l-3.236038,4.731917c-0.975723,1.427576 -0.177002,2.594461 1.774445,2.594461l20.038418,0c1.953274,0 2.750664,-1.166885 1.775829,-2.594461l0,0zm-10.870243,0.732548l-1.919575,0l0,-1.555851l1.919575,0l0,1.555851zm-0.092484,-2.702253l-1.73328,0l-0.172131,-6.657048l2.062057,0l-0.156647,6.657048z" stroke="#ffffff" fill="#ffffff"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -1,14 +0,0 @@
<svg width="88" height="28" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="30" width="90" y="-1" x="-1"/>
</g>
<g>
<title>Layer 1</title>
<rect id="svg_1" height="26.315784" width="81.894718" y="0.999998" x="1" fill-opacity="null" stroke-opacity="null" stroke-width="2" stroke="#4c4c4c" fill="none"/>
<rect id="svg_2" height="20.210522" width="22.736838" y="3.947366" x="4.578944" stroke-opacity="null" stroke-width="2" stroke="#4c4c4c" fill="#4c4c4c"/>
<rect id="svg_5" height="20.210522" width="22.736838" y="3.947366" x="30.789471" stroke-opacity="null" stroke-width="2" stroke="#4c4c4c" fill="#4c4c4c"/>
<rect id="svg_7" height="5.263157" width="3.999999" y="12.368417" x="82.894717" stroke-opacity="null" stroke-width="2" stroke="#4c4c4c" fill="none"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 932 B

View file

@ -1,15 +0,0 @@
<svg width="88" height="28" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect x="-1" y="-1" width="20.526313" height="7.894736" id="canvas_background" fill="none"/>
</g>
<g>
<title>Layer 1</title>
<rect fill="none" stroke="#ffffff" stroke-width="2" fill-opacity="null" x="1" y="0.999998" width="81.894718" height="26.315784" id="svg_1"/>
<rect fill="#ffffff" stroke="#ffffff" stroke-width="2" x="4.578944" y="3.947366" width="22.736838" height="20.210522" id="svg_2"/>
<rect fill="#ffffff" stroke="#ffffff" stroke-width="2" x="30.789471" y="3.947366" width="22.736838" height="20.210522" id="svg_5"/>
<rect fill="none" stroke="#ffffff" stroke-width="2" x="82.894717" y="12.368417" width="3.999999" height="5.263157" id="svg_7"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 858 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

View file

@ -1,14 +0,0 @@
<svg width="37" height="45" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect x="-1" y="-1" width="4.998385" height="5.646685" id="canvas_background" fill="none"/>
</g>
<g>
<title>Layer 1</title>
<rect fill="#ffffff" stroke="#ffffff" stroke-width="3" x="1.499999" y="12.033397" width="34" height="31.198336" id="svg_1"/>
<path fill="#ffffff" stroke="#ffffff" stroke-width="3" d="m1.787369,10.792826l6.707077,-9.292826l20.121235,0l6.706993,9.292826l-6.706993,9.293005l-20.121235,0l-6.707077,-9.293005z" id="svg_3"/>
<path fill="#ff007f" stroke="#f50057" stroke-width="0.1" d="m6.012915,23.986172c3.391615,0 6.58049,1.356598 8.976097,3.815023c2.400892,2.460051 3.720869,5.73773 3.720869,9.225225l5.228432,0c0,-10.132326 -8.042473,-18.374136 -17.92646,-18.374136l0,5.333887l0.001063,0l-0.000001,0zm0.006737,-9.457245c12.090816,0 21.925318,10.094976 21.925318,22.503983l5.226238,0c0,-15.349382 -12.180334,-27.8395 -27.152637,-27.8395l0,5.335514l0.001082,0l-0.000001,0.000004zm7.228214,18.774704c0,2.041348 -1.620888,3.698376 -3.619726,3.698376s-3.619571,-1.657028 -3.619571,-3.698376c0,-2.037918 1.620992,-3.694717 3.619571,-3.694717s3.619726,1.653553 3.619726,3.694717z" id="svg_8"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -1,13 +0,0 @@
<svg width="52" height="42" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="44" width="54" y="-1" x="-1"/>
</g>
<g>
<title>Layer 1</title>
<path id="svg_7" d="m47.913887,6.962914c0,3.845634 -9.750057,6.963047 -21.777805,6.963047m21.777805,-6.963047l0,0c0,3.845634 -9.750057,6.963047 -21.777805,6.963047c-12.027187,0 -21.777691,-3.117413 -21.777691,-6.963047m0,0l0,0c0,-3.845406 9.750504,-6.962914 21.777691,-6.962914c12.027748,0 21.777805,3.117508 21.777805,6.962914l0,27.851788c0,3.845512 -9.750057,6.96302 -21.777805,6.96302c-12.027187,0 -21.777691,-3.117508 -21.777691,-6.96302l0,-27.851788z" stroke-width="NaN" stroke="#4c4c4c" fill="#4c4c4c"/>
<line stroke-linecap="null" stroke-linejoin="null" id="svg_8" y2="32.176623" x2="50.555556" y1="9.806282" x1="50.703705" stroke-width="2" stroke="#4c4c4c" fill="none"/>
<line stroke-linecap="null" stroke-linejoin="null" id="svg_9" y2="32.769215" x2="1.296296" y1="10.398873" x1="1.444445" stroke-width="2" stroke="#4c4c4c" fill="none"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -1,14 +0,0 @@
<svg width="72" height="49" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<g>
<title>background</title>
<rect fill="none" id="canvas_background" height="51" width="74" y="-1" x="-1"/>
</g>
<g>
<title>Layer 1</title>
<path id="svg_7" d="m58.199665,10.123037c0,3.845639 -9.750061,6.963049 -21.777809,6.963049m21.777809,-6.963049l0,0c0,3.845639 -9.750061,6.963049 -21.777809,6.963049c-12.027191,0 -21.777691,-3.11741 -21.777691,-6.963049m0,0l0,0c0,-3.8454 9.7505,-6.96291 21.777691,-6.96291c12.027748,0 21.777809,3.11751 21.777809,6.96291l0,27.851789c0,3.845509 -9.750061,6.96302 -21.777809,6.96302c-12.027191,0 -21.777691,-3.117512 -21.777691,-6.96302l0,-27.851789z" stroke-width="NaN" stroke="#ffffff" fill="#ffffff"/>
<line stroke-linecap="null" stroke-linejoin="null" id="svg_8" y2="33.926006" x2="65.660338" y1="11.555665" x1="65.808487" stroke-width="5" stroke="#ffffff" fill="none"/>
<line stroke-linecap="null" stroke-linejoin="null" id="svg_9" y2="33.847692" x2="7.819088" y1="11.47735" x1="7.967237" stroke-width="5" stroke="#ffffff" fill="none"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 364 KiB

View file

@ -1,9 +0,0 @@
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild

View file

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>

View file

@ -1,33 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
<option name="myNullables">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
</list>
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>

View file

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/MyApplication.iml" filepath="$PROJECT_DIR$/MyApplication.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
</modules>
</component>
</project>

Some files were not shown because too many files have changed in this diff Show more