main: drop pulse input in favor of existing BPM, add to default config

This commit is contained in:
2023-02-19 18:46:28 +01:00
parent d824dbfa45
commit ea058a33da
2 changed files with 13 additions and 23 deletions

View File

@ -34,24 +34,6 @@ Display dpy(leds, HardwareConfig::MAX_LED_NUM, Static<ConfigService>::instance()
}
});*/
InputFunc randomPulse([]() {
static unsigned int pulse = 0;
EVERY_N_MILLISECONDS(25) {
if (pulse == 0) {
pulse = random(25) + 25;
}
}
if (pulse > 0) {
if (random(255) >= 25) {
pulse--;
return InputEvent{InputEvent::Acceleration, beatsin16(60 * 8, 0, 4972)};
}
}
return InputEvent{};
}, "Pulse");
REGISTER_TASK(randomPulse);
InputMapper keyMap([](const InputEvent& evt) {
if (evt.intent == InputEvent::UserInput) {
Buttons::Chord chord = (Buttons::Chord)evt.asInt();
@ -74,7 +56,6 @@ InputMapper keyMap([](const InputEvent& evt) {
REGISTER_TASK(keyMap);
// Cycle some random colors
ColorSequenceInput<9> idleCycle{{
CRGB(0, 123, 167), // Cerulean