CUSTOM FIRMWARE - KR4 Quick Channel Switching

This is an anduril fork for 2 channel KR4. It might work on the D4, but it most likely would need to be modified slightly.

Big shout out to ToyKeeper for her awesome spaghetti monster tools, making it so anybody can program their light. I would have never completed this without her work.

Goals for this firmware:

  1. Cut the fat
    I got rid of the unnecessary blinky modes, and some other things. It was far too much work to configure this light in anduril, so I limited the configuration modes and set things to sane levels stock.

  2. Quick channel switching
    I mapped the channel switch to 3C and eliminated tint ramping. You can also set the emitter channel separately for turbo/boost levels.

  3. Quickly alternate between high and low levels.
    Smooth ramping mode now has two ramps available to you. 1H for a normal ramp and 2H for a “boost” ramp. Boost ramp will quickly step up to higher levels, but allow you to return to the memorized level with 1C. The emitter channel can also be set individualy for the boost level. For example, you want to peak down the trail. 2H to quickly set “boost” level. 3C to switch to W1 emitters. 1C to go back to low level high cri walking light. 2C to return to W1 high level. Turbo turbo can be set as boost level.

  4. Momentary Moon, Momentary High
    Momentary light is available from both off and lockout state. Simply hold button to get momentary floor level. If you let go when the emitter turns on, it will enter ramp mode at that level. Hold on longer and the light will be momentary, turning off when you release the button. 2H from off will activate the boost level/tint, momentary behaviour being the same. From lockdown you get the momentaries, but you can not enter ramp mode this way.

  5. Low Voltage Warning
    I got sick of always turning into a beacon while I wait for my light to flash me its battery level, and I never remembered how the aux voltage mode worked. I implemented a quick red or orange flash to indicate low voltage when turning the light on or off. Also I rearranged the colors in the aux voltage mode to make more sense, green is good red is bad. Also I made the blinky modes nicer.

IMPORTANT:
This is a new firmware. I did quite a bit of bench testing, but it has not been taken into the field. That being said, I am leaving on a long term backpacking trip with this as my only light. So while I will put it through it’s paces, I will not be able to make changes to the code if something comes up.

Anyway, be sure to read the read me and flash at your own risk. I included 2 hex files built for KR4 and all the source files. If you want to modify/fix the code, first download the source from the GitHub repository and then place my ToyKeeper folder next to the existing one.

LINK:

I probably won’t be around to offer support, but I hope this is useful to somebody!