aboutsummaryrefslogtreecommitdiff
path: root/mavigator-cockpit/src/main/scala/mavigator/cockpit/Cockpit.scala
diff options
context:
space:
mode:
authorJakob Odersky <jakob@odersky.com>2016-02-27 17:11:10 -0800
committerJakob Odersky <jakob@odersky.com>2016-04-14 04:03:17 -0700
commitdae336ee5514970fee93b0db25ce272ab83bd3c7 (patch)
treea628a7c02c6956d99510d98f2a0321be00b241bf /mavigator-cockpit/src/main/scala/mavigator/cockpit/Cockpit.scala
parent773bc081728bf770281a22c1700d05b1def75542 (diff)
downloadmavigator-dae336ee5514970fee93b0db25ce272ab83bd3c7.tar.gz
mavigator-dae336ee5514970fee93b0db25ce272ab83bd3c7.tar.bz2
mavigator-dae336ee5514970fee93b0db25ce272ab83bd3c7.zip
Refactor UI to a HUD-style interface
Diffstat (limited to 'mavigator-cockpit/src/main/scala/mavigator/cockpit/Cockpit.scala')
-rw-r--r--mavigator-cockpit/src/main/scala/mavigator/cockpit/Cockpit.scala26
1 files changed, 26 insertions, 0 deletions
diff --git a/mavigator-cockpit/src/main/scala/mavigator/cockpit/Cockpit.scala b/mavigator-cockpit/src/main/scala/mavigator/cockpit/Cockpit.scala
new file mode 100644
index 0000000..f8aba76
--- /dev/null
+++ b/mavigator-cockpit/src/main/scala/mavigator/cockpit/Cockpit.scala
@@ -0,0 +1,26 @@
+package mavigator
+package cockpit
+
+import scala.scalajs.js.annotation.JSExport
+
+import mavigator.util.{Environment, Application}
+import scalatags.JsDom.all._
+import util._
+
+class Cockpit
+ extends Page
+ with Layout
+ with MavlinkWebSockets
+ with Instruments
+
+@JSExport("mavigator_cockpit_Main")
+object Cockpit extends Application {
+
+ override def main(args: Map[String, String])(implicit env: Environment): Unit = {
+ val app = new Cockpit
+ app.attach(env)
+ app.connect(args("socketUrl"), args("remoteSystemId").toInt)
+ }
+
+}
+