aboutsummaryrefslogtreecommitdiff
path: root/mavigator-server
diff options
context:
space:
mode:
authorJakob Odersky <jakob@odersky.com>2016-02-04 22:57:01 -0800
committerJakob Odersky <jakob@odersky.com>2016-02-04 22:57:01 -0800
commitfce963dab70b163a79cb52dff4bac3dfd32c5f37 (patch)
treed28c88ce9f5432e5ed01407689153c297ea72be0 /mavigator-server
parentb57a8c710d94ab6ce35fbbb0b9fc00649792e4be (diff)
downloadmavigator-fce963dab70b163a79cb52dff4bac3dfd32c5f37.tar.gz
mavigator-fce963dab70b163a79cb52dff4bac3dfd32c5f37.tar.bz2
mavigator-fce963dab70b163a79cb52dff4bac3dfd32c5f37.zip
move mock connection to stream (performance is really bad)
Diffstat (limited to 'mavigator-server')
-rw-r--r--mavigator-server/src/main/resources/application.conf41
-rw-r--r--mavigator-server/src/main/scala/mavigator/Router.scala5
2 files changed, 3 insertions, 43 deletions
diff --git a/mavigator-server/src/main/resources/application.conf b/mavigator-server/src/main/resources/application.conf
index 28511ad..85d609b 100644
--- a/mavigator-server/src/main/resources/application.conf
+++ b/mavigator-server/src/main/resources/application.conf
@@ -1,6 +1,6 @@
mavigator {
- # Interface to listen for client connections
+ # Interface to listen on for client connections
interface = "0.0.0.0"
# Port on which to listen for client connections
@@ -9,43 +9,4 @@ mavigator {
# Mavlink system ID identifying this base station
system_id = 1
- # Settings related to the connection with a UAV
- connection {
-
- # The type of connection to use
- # 'mock' or 'serial'
- type = mock
-
- # Mavlink component ID used by this connection,
- # in case it needs to inject messages. I.e. heartbeats
- # will originate from this ID.
- component_id = 1
-
- # Interval in milliseconds between heartbeat messages injected by
- # the connection
- # 0 = no heartbeats injected
- heartbeat = 2000
-
- # Settings related to serial connections
- serial {
- # Serial port
- port = "/dev/ttyUSB0"
- # Baud rate (b/s)
- baud = 115200
- # Use two stop bits
- two_stop_bits = false
- # Parity check
- # 0 = None, 1 = Odd, 2 = Even
- parity = 0
- }
-
- # Settings related to mock connections
- mock {
- # Mavlink system ID of the simulated UAV
- remote_system_id = 42
- # Speed multiplier of simulation
- prescaler = 1
- }
- }
-
} \ No newline at end of file
diff --git a/mavigator-server/src/main/scala/mavigator/Router.scala b/mavigator-server/src/main/scala/mavigator/Router.scala
index 1d2107a..6d442bf 100644
--- a/mavigator-server/src/main/scala/mavigator/Router.scala
+++ b/mavigator-server/src/main/scala/mavigator/Router.scala
@@ -31,7 +31,7 @@ object Router {
path("info") {
get {
val f: Html = mavigator.views.html.dashboard(
- "socket",
+ "ws://localhost:8080/mavlink",
0,
0,
0
@@ -57,8 +57,7 @@ object Router {
}
val toWebSocket = Flow[ByteString].map{bytes =>
- //BinaryMessage(bytes)
- TextMessage(bytes.decodeString("UTF-8"))
+ BinaryMessage(bytes)
}
val bytes = Uav().connect()