keyboardio / Chrysalis-Firmware-Bundle

Firmware sketches for boards supported by Chrysalis
GNU General Public License v2.0
32 stars 25 forks source link

Adjust the Model100 firmware to default to Colormap #26

Open algernon opened 1 year ago

algernon commented 1 year ago

It looks like the way we handle LED effects is a frequent source of confusion: people set up colors with Chrysalis, and then wonder why they don't show up. While Chrysalis could do a better job at explaining that they need to switch to the Colormap effect, it would be even better if the keyboard helped them in that regard, too.

What if we defaulted to Colormap, if there is no default LED mode set?

I wouldn't move the plugin in the plugin list, but do something like: if (DefaultLEDModeConfig.isUninitialized()) ColormapEffect.activate();.

Since the palette is all black by default, this would mean that the keyboard behaves the same out of the box as with LEDOff: all LEDs are off. But once a palette & colormap is saved, they'd be active immediately, without having to explicitly switch the mode.

algernon commented 1 year ago

Actually, the Model100 firmware already has:

  // Unless configured otherwise with Chrysalis, we want to make sure that the
  // firmware starts with LED effects off. This avoids over-taxing devices that
  // don't have a lot of power to share with USB devices
  DefaultLEDModeConfig.activateLEDModeIfUnconfigured(&LEDOff);

We could adjust that to use &ColormapEffect, along with the comment above it.

obra commented 1 year ago

So the reason we default to all-off is that otherwise it draws more power than apple's mobile devices accept and gets force-disconnected immediately.

Instead of doing this in firmware, I wonder if we want to do this with Chrysalis the first time an update that enables colors on the colormap is made.

algernon commented 1 year ago

That's not a bad idea. We'll need to make things a bit smarter first, to figure out the index of the colormap plugin, to be able to properly set it as the default from Chrysalis. But I like the idea, lets do this on the Chrysalis side.

(Not closing this yet, will do so once I open an issue on the Chrysalis side)

fredcallaway commented 1 year ago

Bump. This confusion just got me. Is there a hot fix in the mean time? I thought I would find a default LED mode in the Chrysalis settings because DefaultLEDModeConfig is included in the current firmware (0.91). Am I missing something obvious?