Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
grains
grains-web
Commits
9bb253e5
Commit
9bb253e5
authored
May 09, 2017
by
Jens-Christian Fischer
Browse files
Really send to the correct channel
parent
93ddc2df
Changes
3
Hide whitespace changes
Inline
Side-by-side
mix.exs
View file @
9bb253e5
...
@@ -3,7 +3,7 @@ defmodule Grains.Mixfile do
...
@@ -3,7 +3,7 @@ defmodule Grains.Mixfile do
def
project
do
def
project
do
[
app:
:grains
,
[
app:
:grains
,
version:
"0.0.4
4
"
,
version:
"0.0.4
5
"
,
elixir:
"~> 1.2"
,
elixir:
"~> 1.2"
,
elixirc_paths:
elixirc_paths
(
Mix
.
env
),
elixirc_paths:
elixirc_paths
(
Mix
.
env
),
compilers:
[
:phoenix
,
:gettext
]
++
Mix
.
compilers
,
compilers:
[
:phoenix
,
:gettext
]
++
Mix
.
compilers
,
...
...
web/channels/acceleration_channel.ex
View file @
9bb253e5
...
@@ -20,7 +20,7 @@ defmodule Grains.AccelerationChannel do
...
@@ -20,7 +20,7 @@ defmodule Grains.AccelerationChannel do
z:
z
z:
z
}
)
}
)
Grains
.
Endpoint
.
broadcast
"visuals"
,
"acceleration"
,
%{
user:
uuid
,
force:
z
}
Grains
.
Endpoint
.
broadcast
"visuals
:data
"
,
"acceleration"
,
%{
user:
uuid
,
force:
z
}
{
:reply
,
:ok
,
socket
}
{
:reply
,
:ok
,
socket
}
...
...
web/channels/orientation_channel.ex
View file @
9bb253e5
...
@@ -28,7 +28,7 @@ defmodule Grains.OrientationChannel do
...
@@ -28,7 +28,7 @@ defmodule Grains.OrientationChannel do
}
}
)
)
Grains
.
Endpoint
.
broadcast
"visuals"
,
"velocity"
,
%{
user:
uuid
,
dx:
pitch
,
dy:
roll
}
Grains
.
Endpoint
.
broadcast
"visuals
:data
"
,
"velocity"
,
%{
user:
uuid
,
dx:
pitch
,
dy:
roll
}
# Grains.Endpoint.broadcast("osc", "orientation", %{user: socket.assigns.user_uuid,
# Grains.Endpoint.broadcast("osc", "orientation", %{user: socket.assigns.user_uuid,
# pitch: pitch,
# pitch: pitch,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment