diff options
Diffstat (limited to 'vfd-backend/app/controllers/Application.scala')
-rw-r--r-- | vfd-backend/app/controllers/Application.scala | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/vfd-backend/app/controllers/Application.scala b/vfd-backend/app/controllers/Application.scala deleted file mode 100644 index 827950e..0000000 --- a/vfd-backend/app/controllers/Application.scala +++ /dev/null @@ -1,28 +0,0 @@ -package controllers - -import util._ -import play.api._ -import play.api.mvc._ -import play.api.Play.current -import play.api.mvc.WebSocket.FrameFormatter - -import play.api.libs.json._ -import plugins.UavPlugin - -object Application extends Controller { - - private def plugin = current.plugin[UavPlugin].getOrElse(throw new RuntimeException("UAV plugin is not available")) - - def index = Action { implicit request => - Redirect(routes.Application.uav(0)) - } - - def uav(remoteSystemId: Int) = Action { implicit request => - Ok(views.html.uav(routes.Application.mavlink.webSocketURL(), remoteSystemId.toByte, plugin.systemId, 0.toByte)) - } - - def mavlink = WebSocket.acceptWithActor[Array[Byte], Array[Byte]] { implicit request => - out => plugin.register(out) - } - -}
\ No newline at end of file |