Skip to content

Commit

Permalink
exponentialMode fx
Browse files Browse the repository at this point in the history
  • Loading branch information
openshwprojects committed Dec 14, 2022
1 parent 45697d3 commit 7c8477f
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/cmnds/cmd_newLEDDriver.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,21 +278,6 @@ void LED_RunQuickColorLerp(int deltaMS) {

int exponential_mode = 2;

/* exponential mode command handler, usage: led_expoMode <0|1|2|3|4>
exponential modes: 0 = Off
1 = 1% min brightness with moderate exponential
2 = 1% min brightness with full exponential
3 = 0.1% min brightness with moderate exponential
4 = 0.1% min brightness with full exponential
*/
static commandResult_t exponentialMode (const void *context, const char *cmd, const char *args, int cmdFlags) {
int mode = atoi (args);
if((mode >= 0) && (mode <= 4)) {
exponential_mode = mode;
apply_smart_light ();
}
return CMD_RES_OK;
}

void apply_smart_light() {
int i;
Expand Down Expand Up @@ -455,6 +440,21 @@ void apply_smart_light() {
}


/* exponential mode command handler, usage: led_expoMode <0|1|2|3|4>
exponential modes: 0 = Off
1 = 1% min brightness with moderate exponential
2 = 1% min brightness with full exponential
3 = 0.1% min brightness with moderate exponential
4 = 0.1% min brightness with full exponential
*/
static commandResult_t exponentialMode(const void *context, const char *cmd, const char *args, int cmdFlags) {
int mode = atoi(args);
if ((mode >= 0) && (mode <= 4)) {
exponential_mode = mode;
apply_smart_light();
}
return CMD_RES_OK;
}
static OBK_Publish_Result sendColorChange() {
char s[16];
byte c[3];
Expand Down

0 comments on commit 7c8477f

Please sign in to comment.