updated petal to have working GetExpression implementation.
@@ -148,6 +148,11 @@ float DaisyPetal::GetKnobValue(Knob k)
return knob[idx].Value();
}
+float DaisyPetal::GetExpression()
+{
+ return expression.Value();
+}
+
void DaisyPetal::DebounceControls()
{
encoder.Debounce();
@@ -167,9 +172,15 @@ void DaisyPetal::ClearLeds()
// {
// ring_led[i].SetColor(c);
// }
- for(size_t i = 0; i < LED_LAST; i++) {
- dsy_led_driver_set_led(i, 0);
+ for(size_t i = 0; i < RING_LED_LAST; i++)
+ {
+ SetRingLed(static_cast<RingLed>(i), 0.0f, 0.0f, 0.0f);
}
+ for(size_t i = 0; i < FOOTSWITCH_LED_LAST; i++)
+ {
+ SetFootswitchLed(static_cast<FootswitchLed>(i), 0.0f);
+ }
+
}
void DaisyPetal::UpdateLeds()
@@ -277,6 +288,7 @@ void DaisyPetal::InitAnalogControls()
cfg[KNOB_6].InitSingle(seed.GetPin(PIN_KNOB_6));
// Special case for Expression
cfg[KNOB_LAST].InitSingle(seed.GetPin(PIN_EXPRESSION));
+
seed.adc.Init(cfg, KNOB_LAST + 1);
// Make an array of pointers to the knob.
for(int i = 0; i < KNOB_LAST; i++)
