Last active
December 24, 2015 02:59
-
-
Save bergie/6733886 to your computer and use it in GitHub Desktop.
AR.Drone battery gauge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "properties": { | |
| "environment": { | |
| "runtime": "html", | |
| "src": "./preview/iframe.html", | |
| "width": 300, | |
| "height": 300, | |
| "content": "<style>body { width: 100%; background-image:url(https://raw.github.com/cannonerd/flowDrone/master/gauges/core/app/asset/img/bg.jpg); overflow: hidden; } .gaugeframebg, .compassWrapper, .compassrotator, .compasscenter, .centerstatic, .attitudeWrapper, .attitudemoving, .attitudestaticouter, .attitudestatic, .speedometerWrapper, .speedometerstaticbg, .speedometerpointer, .altitudeWrapper,.altitudedisk, .altitudetaticbg, .altitudepointershort, .altitudepointerlong, .batteryWrapper, .batterystaticbg, .batterypointer { position: absolute; top:0; left:0; width: 100%; }</style><div class='batteryWrapper'><img class='gaugeframebg' src='https://raw.github.com/cannonerd/flowDrone/master/gauges/core/app/asset/img/frame/instrumentframe-without-screws.png' alt='gaugeframebg'><img class='batterystaticbg' src='https://raw.github.com/cannonerd/flowDrone/master/gauges/core/app/asset/img/battery/dial.png' alt='speedometerstaticbg'><img class='batterypointer' src='https://raw.github.com/cannonerd/flowDrone/master/gauges/core/app/asset/img/battery/hand.png' alt='speedometerpointer'></div>" | |
| }, | |
| "name": "BatteryGauge" | |
| }, | |
| "exports": [], | |
| "processes": { | |
| "websocket/Connect_b2jzd": { | |
| "component": "websocket/Connect", | |
| "metadata": { | |
| "x": 400, | |
| "y": 82, | |
| "label": "websocket/Connect" | |
| } | |
| }, | |
| "websocket/ListenMessages_45gmu": { | |
| "component": "websocket/ListenMessages", | |
| "metadata": { | |
| "x": 609, | |
| "y": 88, | |
| "label": "websocket/ListenMessages" | |
| } | |
| }, | |
| "strings/ParseJson_j377f": { | |
| "component": "strings/ParseJson", | |
| "metadata": { | |
| "x": 817, | |
| "y": 85.578125, | |
| "label": "strings/ParseJson" | |
| } | |
| }, | |
| "ReadBatteryValue_hr1yu": { | |
| "component": "objects/GetObjectKey", | |
| "metadata": { | |
| "x": 1057.8333333333333, | |
| "y": 87, | |
| "label": "ReadBatteryValue" | |
| } | |
| }, | |
| "ConvertToDegrees_ig6mu": { | |
| "component": "math/Multiply", | |
| "metadata": { | |
| "x": 1274.8333333333333, | |
| "y": 88, | |
| "label": "ConvertToDegrees" | |
| } | |
| }, | |
| "MoveTheNeedle_mve9r": { | |
| "component": "css/RotateElement", | |
| "metadata": { | |
| "x": 1961.8333333333333, | |
| "y": -65.421875, | |
| "label": "MoveTheNeedle" | |
| } | |
| }, | |
| "GetNeedleFromDOM_ywpd2": { | |
| "component": "dom/GetElement", | |
| "metadata": { | |
| "x": 1719.8333333333333, | |
| "y": -64.421875, | |
| "label": "GetNeedleFromDOM" | |
| } | |
| }, | |
| "ZeroToBottom_g5gqj": { | |
| "component": "math/Subtract", | |
| "metadata": { | |
| "x": 1490, | |
| "y": 87, | |
| "label": "ZeroToBottom" | |
| } | |
| }, | |
| "MergeValues_gbvvj": { | |
| "component": "core/Merge", | |
| "metadata": { | |
| "x": 1719.6666666666665, | |
| "y": 85.33333333333334, | |
| "label": "MergeValues" | |
| } | |
| }, | |
| "InitialNeedlePosition_kojdp": { | |
| "component": "core/Repeat", | |
| "metadata": { | |
| "x": 1507.6666666666665, | |
| "y": 234.33333333333334, | |
| "label": "InitialNeedlePosition" | |
| } | |
| }, | |
| "core/Output_egdc0": { | |
| "component": "core/Output", | |
| "metadata": { | |
| "x": 632.6666666666666, | |
| "y": 213.33333333333334, | |
| "label": "core/Output" | |
| } | |
| } | |
| }, | |
| "connections": [ | |
| { | |
| "src": { | |
| "process": "websocket/Connect_b2jzd", | |
| "port": "connection" | |
| }, | |
| "tgt": { | |
| "process": "websocket/ListenMessages_45gmu", | |
| "port": "connection" | |
| }, | |
| "metadata": { | |
| "route": 0 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "websocket/ListenMessages_45gmu", | |
| "port": "string" | |
| }, | |
| "tgt": { | |
| "process": "strings/ParseJson_j377f", | |
| "port": "in" | |
| }, | |
| "metadata": { | |
| "route": 0 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "strings/ParseJson_j377f", | |
| "port": "out" | |
| }, | |
| "tgt": { | |
| "process": "ReadBatteryValue_hr1yu", | |
| "port": "in" | |
| }, | |
| "metadata": { | |
| "route": 0 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "ReadBatteryValue_hr1yu", | |
| "port": "out" | |
| }, | |
| "tgt": { | |
| "process": "ConvertToDegrees_ig6mu", | |
| "port": "multiplicand" | |
| }, | |
| "metadata": { | |
| "route": 0 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "ConvertToDegrees_ig6mu", | |
| "port": "product" | |
| }, | |
| "tgt": { | |
| "process": "ZeroToBottom_g5gqj", | |
| "port": "minuend" | |
| }, | |
| "metadata": { | |
| "route": 0 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "ZeroToBottom_g5gqj", | |
| "port": "difference" | |
| }, | |
| "tgt": { | |
| "process": "MergeValues_gbvvj", | |
| "port": "in" | |
| }, | |
| "metadata": { | |
| "route": 0 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "InitialNeedlePosition_kojdp", | |
| "port": "out" | |
| }, | |
| "tgt": { | |
| "process": "MergeValues_gbvvj", | |
| "port": "in" | |
| }, | |
| "metadata": { | |
| "route": 0 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "websocket/Connect_b2jzd", | |
| "port": "error" | |
| }, | |
| "tgt": { | |
| "process": "core/Output_egdc0", | |
| "port": "in" | |
| }, | |
| "metadata": { | |
| "route": 0 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "GetNeedleFromDOM_ywpd2", | |
| "port": "element" | |
| }, | |
| "tgt": { | |
| "process": "MoveTheNeedle_mve9r", | |
| "port": "element" | |
| }, | |
| "metadata": { | |
| "route": 0 | |
| } | |
| }, | |
| { | |
| "src": { | |
| "process": "MergeValues_gbvvj", | |
| "port": "out" | |
| }, | |
| "tgt": { | |
| "process": "MoveTheNeedle_mve9r", | |
| "port": "degrees" | |
| }, | |
| "metadata": { | |
| "route": 0 | |
| } | |
| }, | |
| { | |
| "data": "flowcopter", | |
| "tgt": { | |
| "process": "websocket/Connect_b2jzd", | |
| "port": "protocol" | |
| } | |
| }, | |
| { | |
| "data": "ws://localhost:8000", | |
| "tgt": { | |
| "process": "websocket/Connect_b2jzd", | |
| "port": "url" | |
| } | |
| }, | |
| { | |
| "data": "batteryPercentage", | |
| "tgt": { | |
| "process": "ReadBatteryValue_hr1yu", | |
| "port": "key" | |
| } | |
| }, | |
| { | |
| "data": "3.6", | |
| "tgt": { | |
| "process": "ConvertToDegrees_ig6mu", | |
| "port": "multiplier" | |
| } | |
| }, | |
| { | |
| "data": ".batterypointer", | |
| "tgt": { | |
| "process": "GetNeedleFromDOM_ywpd2", | |
| "port": "selector" | |
| } | |
| }, | |
| { | |
| "data": "180", | |
| "tgt": { | |
| "process": "ZeroToBottom_g5gqj", | |
| "port": "subtrahend" | |
| } | |
| }, | |
| { | |
| "data": "187", | |
| "tgt": { | |
| "process": "InitialNeedlePosition_kojdp", | |
| "port": "in" | |
| } | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment