diff options
| author | Selene ToyKeeper | 2023-07-16 16:27:44 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2023-07-16 16:27:44 -0600 |
| commit | 723b5b1ffa8f12b29110a2133a8f09beaf528aad (patch) | |
| tree | 229a77ce7bc61ec065cef4ecee8be330ac7fd624 /hwdef-noctigon-m44.c | |
| parent | refactored how channel modes are defined, and converted emisar-2ch build (diff) | |
| download | anduril-723b5b1ffa8f12b29110a2133a8f09beaf528aad.tar.gz anduril-723b5b1ffa8f12b29110a2133a8f09beaf528aad.tar.bz2 anduril-723b5b1ffa8f12b29110a2133a8f09beaf528aad.zip | |
fixed d4v2, kr4, m44, emisar-2ch (using new refactor),
added RGB aux channel modes to models which didn't have it
Diffstat (limited to 'hwdef-noctigon-m44.c')
| -rw-r--r-- | hwdef-noctigon-m44.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/hwdef-noctigon-m44.c b/hwdef-noctigon-m44.c index 482ef05..3fc6abe 100644 --- a/hwdef-noctigon-m44.c +++ b/hwdef-noctigon-m44.c @@ -1,8 +1,55 @@ // hwdef for Noctigon M44 2-channel light // Copyright (C) 2023 Selene ToyKeeper // SPDX-License-Identifier: GPL-3.0-or-later + #pragma once +#include "chan-rgbaux.c" + + +void set_level_ch1(uint8_t level); +void set_level_ch2(uint8_t level); +void set_level_both(uint8_t level); +void set_level_blend(uint8_t level); +void set_level_auto(uint8_t level); + +bool gradual_tick_ch1(uint8_t gt); +bool gradual_tick_ch2(uint8_t gt); +bool gradual_tick_both(uint8_t gt); +bool gradual_tick_blend(uint8_t gt); +bool gradual_tick_auto(uint8_t gt); + + +Channel channels[] = { + { // channel 1 only + .set_level = set_level_ch1, + .gradual_tick = gradual_tick_ch1, + .has_args = 0 + }, + { // channel 2 only + .set_level = set_level_ch2, + .gradual_tick = gradual_tick_ch2, + .has_args = 0 + }, + { // both channels, tied together (max "200%" power) + .set_level = set_level_both, + .gradual_tick = gradual_tick_both, + .has_args = 0 + }, + { // both channels, manual blend (max "100%" power) + .set_level = set_level_blend, + .gradual_tick = gradual_tick_blend, + .has_args = 1 + }, + { // both channels, auto blend + .set_level = set_level_auto, + .gradual_tick = gradual_tick_auto, + .has_args = 1 + }, + RGB_AUX_CHANNELS +}; + + // set new values for both channels, // handling any possible combination // and any before/after state |
