neiam
/lambent_ex
Lambent Aether 5
public · Issues · Pulls 1 · Labels · Forks · Compare · Actions success · Badges · Packages
Log in to mark this repository.
bunch of warnings, 7777 flex supp
e8886de · gmorell · 2024-03-05 04:32
Files changed
modified
lib/lambent_ex/machine/steps/chase.ex
+1
−1
| 24 | 24 | |
| 25 | 25 | def init(opts) do |
| 26 | 26 | opts = opts |> Map.put(:status, opts.id) |
| 27 | − cfg = struct(%LambentEx.Machine.Steps.Chase.Cfg{}, opts) | |
| 27 | + cfg = struct(%Cfg{}, opts) | |
| 28 | 28 | {:ok, %{cfg | window: 255 / (cfg.spacing - cfg.fadeby)}} |
| 29 | 29 | end |
| 30 | 30 |
modified
lib/lambent_ex/machine/steps/firefly.ex
+2
−2
| 24 | 24 | |
| 25 | 25 | def init(opts) do |
| 26 | 26 | opts = opts |> Map.put(:status, opts.id) |
| 27 | − cfg = struct(%LambentEx.Machine.Steps.Firefly.Cfg{}, opts) |> Map.from_struct() | |
| 27 | + cfg = struct(%Cfg{}, opts) |> Map.from_struct() | |
| 28 | 28 | |
| 29 | 29 | {:ok, |
| 30 | 30 | cfg |
| 75 | 75 | Enum.random([state[:v], div(state[:v], 2), div(state[:v], 3)]) |
| 76 | 76 | ) |
| 77 | 77 | |
| 78 | − otherwise -> | |
| 78 | + _otherwise -> | |
| 79 | 79 | state |> Map.put(:v_curr, 0) |> Map.put(:active_done, state[:active_done] + 1) |
| 80 | 80 | end |
| 81 | 81 | end |
modified
lib/lambent_ex/machine/steps/growth.ex
+3
−3
| 35 | 35 | |
| 36 | 36 | def init(opts) do |
| 37 | 37 | opts = opts |> Map.put(:status, opts.id) |
| 38 | − cfg = struct(%LambentEx.Machine.Steps.Growth.Cfg{}, opts) |> Map.from_struct() | |
| 38 | + cfg = struct(%Cfg{}, opts) |> Map.from_struct() | |
| 39 | 39 | |
| 40 | 40 | {:ok, |
| 41 | 41 | cfg |
| 74 | 74 | reply = |
| 75 | 75 | case reply do |
| 76 | 76 | nil -> [0, 0, 0] |
| 77 | − val -> reply |> listy |> Color.hsv2rgb() | |
| 77 | + _val -> reply |> listy |> Color.hsv2rgb() | |
| 78 | 78 | end |
| 79 | 79 | |
| 80 | 80 | {:reply, reply, %{state | hues: hues}} |
| 83 | 83 | defp expand(values) do |
| 84 | 84 | values |
| 85 | 85 | |> Enum.map(fn {val, lingerd} -> |
| 86 | − expanded = multier(val, lingerd) | |
| 86 | + multier(val, lingerd) # todo check if this was cocrectly changed | |
| 87 | 87 | end) |
| 88 | 88 | |> List.flatten() |
| 89 | 89 | end |
modified
lib/lambent_ex/machine/steps/rainbow.ex
+1
−1
| 24 | 24 | |
| 25 | 25 | def init(opts) do |
| 26 | 26 | opts = opts |> Map.put(:status, opts.id) |
| 27 | − cfg = struct(%LambentEx.Machine.Steps.Rainbow.Cfg{}, opts) | |
| 27 | + cfg = struct(%Cfg{}, opts) | |
| 28 | 28 | {:ok, cfg} |
| 29 | 29 | end |
| 30 | 30 |
modified
lib/lambent_ex/machine/steps/rocker.ex
+1
−1
| 24 | 24 | |
| 25 | 25 | def init(opts) do |
| 26 | 26 | opts = opts |> Map.put(:status, opts.id) |
| 27 | − cfg = struct(%LambentEx.Machine.Steps.Rocker.Cfg{}, opts) | |
| 27 | + cfg = struct(%Cfg{}, opts) | |
| 28 | 28 | hues = generate_status_hsvs(cfg.h, cfg.l, cfg.d) |
| 29 | 29 | {:ok, %{cfg | hues: hues}} |
| 30 | 30 | end |
modified
lib/lambent_ex/machine/steps/scapes.ex
+1
−1
Click to load diff…
modified
lib/lambent_ex/machine/steps/solid.ex
+2
−2
Click to load diff…
modified
lib/lambent_ex/mqtt.ex
+5
−5
Click to load diff…
modified
lib/lambent_ex/scan/8266-7777.ex
+41
−13
Click to load diff…
modified
lib/lambent_ex_web/live/devices/index.ex
+11
−5
Click to load diff…
modified
lib/lambent_ex_web/live/devices/index.html.heex
+5
−2
Click to load diff…
Parents: 472d3f8