From 723b5b1ffa8f12b29110a2133a8f09beaf528aad Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Sun, 16 Jul 2023 16:27:44 -0600 Subject: fixed d4v2, kr4, m44, emisar-2ch (using new refactor), added RGB aux channel modes to models which didn't have it --- hwdef-noctigon-m44.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'hwdef-noctigon-m44.c') 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 -- cgit v1.2.3