diff options
Diffstat (limited to 'vfd-backend/app/controllers/Application.scala')
-rw-r--r-- | vfd-backend/app/controllers/Application.scala | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/vfd-backend/app/controllers/Application.scala b/vfd-backend/app/controllers/Application.scala index 1c1fe13..6739d3c 100644 --- a/vfd-backend/app/controllers/Application.scala +++ b/vfd-backend/app/controllers/Application.scala @@ -14,9 +14,16 @@ object Application extends Controller { def use[A <: Plugin](implicit app: Application, m: Manifest[A]) = { app.plugin[A].getOrElse(throw new RuntimeException(m.runtimeClass.toString + " plugin should be available at this point")) } + + def uav = use[UavPlugin] + def index = Action { implicit request => - Ok(views.html.index(routes.Application.mavlink.webSocketURL())) + Redirect(routes.Application.uav(0)) + } + + def uav(sysId: Int) = Action { implicit request => + Ok(views.html.uav(routes.Application.mavlink.webSocketURL(), sysId)) } def mavlink = WebSocket.acceptWithActor[Array[Byte], Array[Byte]] { implicit request => |