* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* 0 sink PCH mute switch to PCH
* 1 sink BT mute switch to BT
- * 2 - mic non-mute -
+ * 2 ceil brightness mic non-mute ceiling lights on
* 3 desk brightness - desk lights on
* 4 MPD mute MPD play/pause
* 5 Albireo MPV mute MPD stop
if (!dmx_is_ready())
{
noct_set_ring(3, RING_MODE_SINGLE_ON, 0x7f);
+ noct_set_button(10, 0);
noct_set_button(11, 0);
return;
}
- for (uint i=0; i<1; i++)
+ for (uint i=0; i<2; i++)
{
uint warm, cold;
if (lights_on[i])
{
- noct_set_ring(3, RING_MODE_LEFT, lights_brightness[i] * 127);
- noct_set_button(11, 1);
+ noct_set_ring(3-i, RING_MODE_LEFT, lights_brightness[i] * 127);
+ noct_set_button(11-i, 1);
double r = 2;
double x = (exp(r*lights_brightness[i]) - 1) / (exp(r) - 1);
double t = lights_temperature[i];
}
else
{
- noct_set_ring(3, RING_MODE_LEFT, 0);
- noct_set_button(11, 0);
+ noct_set_ring(3-i, RING_MODE_LEFT, 0);
+ noct_set_button(11-i, 0);
warm = cold = 0;
}
DBG("Lights[%d]: on=%d bri=%.3f temp=%.3f -> warm=%d cold=%d", i, lights_on[i], lights_brightness[i], lights_temperature[i], warm, cold);
static void update_lights_from_slider(int value)
{
lights_temperature[0] = value / 127.;
+ lights_temperature[1] = value / 127.;
update_lights();
}
case 1:
update_sink_from_rotary(delta, BT_SINK);
break;
+ case 2:
+ update_lights_from_rotary(1, delta);
+ break;
case 3:
update_lights_from_rotary(0, delta);
break;
case 9:
update_default_sink_from_button(button, on);
break;
+ case 10:
+ update_lights_from_button(1, on);
+ break;
case 11:
update_lights_from_button(0, on);
break;