Skip to content

Commit

Permalink
Merge pull request #72 from ElixirSeattle/hotfix/refactor-bugs
Browse files Browse the repository at this point in the history
Fix two bugs introduced by last PR
  • Loading branch information
doughsay authored Jul 12, 2020
2 parents 487c56a + 0b70767 commit f84d883
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/rgb_matrix/animation.ex
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ defmodule RGBMatrix.Animation do
"""
@spec new(animation_type :: type, leds :: [LED.t()]) :: {render_in, t}
def new(animation_type, leds) do
config_module = Module.concat([animation_type, Config])
config_module = Module.concat([animation_type, "Config"])
animation_config = config_module.new()
{render_in, animation_state} = animation_type.new(leds, animation_config)

Expand Down
4 changes: 2 additions & 2 deletions lib/rgb_matrix/animation/solid_reactive.ex
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ defmodule RGBMatrix.Animation.SolidReactive do

colors = Enum.map(leds, &{&1.id, color})

{colors, :never, %{state | first_render: false, paused: true}}
{:never, colors, %{state | first_render: false, paused: true}}
end

def render(%{paused: true} = state, _config),
do: {[], :never, state}
do: {:never, [], state}

def render(state, config) do
%{tick: tick, color: color, leds: leds, hits: hits} = state
Expand Down

0 comments on commit f84d883

Please sign in to comment.