aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-05-02RGB buttons: while torch is on, use low mode below a configured levelSelene ToyKeeper1-1/+2
for real-time voltage color display, instead of always using high mode
2023-05-02documented post-off voltage display configSelene ToyKeeper1-57/+64
2023-05-02converted Wurkkos TS25 build...Selene ToyKeeper1-34/+45
... and gave it a smoother ramp ... and the other new functions added recently
2023-05-02D4v2: added the rest of the aux RGB colors as channel modes,Selene ToyKeeper3-3/+26
and set aux "white" as the mode it uses to blink out numbers
2023-05-02made "post-off voltage display" user-configurable in battcheck 7H menu item 2Selene ToyKeeper5-2/+29
(1 click per second the display should last)
2023-05-02fixed bug: channel change could stick when activating a config menu from ↵Selene ToyKeeper1-1/+15
battcheck (the blink function changed the channel, then the config menu saved it, then the blink function restored it, then the config menu restored it to the value it saved, which was wrong)
2023-05-02documented ramp 6C, ramp 4H, lockout 3H, and battcheck 3CSelene ToyKeeper1-2/+15
2023-05-02added ability to set channel mode for number readouts (batt check, temp ↵Selene ToyKeeper6-5/+39
check, version check) Press 3C in batt check mode to change the blink channel. Also fixed TS10 stepped ramp ceiling value.
2023-05-02converted Wurkkos TS10 build (and made its ramp smoother w/ better low modes)Selene ToyKeeper3-33/+64
2023-04-30documented a couple recent changesSelene ToyKeeper1-0/+4
2023-04-29converted Emisar D4Sv2 build, and updated it to use dynamic PWMSelene ToyKeeper1-26/+48
2023-04-29converted KR4-nofet buildSelene ToyKeeper1-5/+3
2023-04-29KR4: ramp can use 8 bits, since values never go over 255Selene ToyKeeper1-0/+5
also, don't blink at top of linear range
2023-04-29Noctigon KR4: updated to use new channel systemSelene ToyKeeper5-24/+42
(also tweaked D4v2 build to match KR4 as much as possible) (also added Extended Simple UI to Hank's config)
2023-04-29just a todo note for laterSelene ToyKeeper1-0/+1
2023-04-29lockout mode: fixed manual memory timer and tint, added 3H next channel,Selene ToyKeeper1-5/+23
and made 3H+ use mem level instead of lowest moon (this is needed for making the channel discernible, and also helps make aux LED controls stand out more) The 3H mapping allows users to change channels without leaving lockout, which was possible before with 3H to ramp tint, but doesn't work in new multi-channel code because it uses 3C instead... and 3C is already used. So the new 3H does sort of what the old 3H did, but in a way which is more relevant to the new channel system.
2023-04-28D4v2: tweaked ramp to make it smootherSelene ToyKeeper1-9/+8
2023-04-28D4v2 FET+1 model: works again, and now uses dynamic PWM (lower lows)Selene ToyKeeper3-18/+72
(also added generic channel modes for RGB aux LEDs)
2023-04-28RGB aux: always preview in high mode, and show voltage during 3-second ↵Selene ToyKeeper1-4/+7
post-off period
2023-04-28changed lockout RGB aux default to blinking voltage, instead of blinking discoSelene ToyKeeper1-1/+2
2023-04-28only use 2-color strobe in tactical mode if it's on main LEDs, not auxSelene ToyKeeper1-1/+4
2023-04-27tactical mode: use police strobe by default, if it existsSelene ToyKeeper1-2/+6
2023-04-27Noctigon KR4-tintramp updated to use new channel systemSelene ToyKeeper1-4/+4
(was easy since it just uses the generic Emisar-2ch build with a couple small overrides)
2023-04-26whitespace cleanupSelene ToyKeeper1-5/+5
2023-04-26change channel mode per config step in channel mode menuSelene ToyKeeper4-6/+34
(to show which channel mode is being edited) also, avoid setting channel mode again if it's not going to change (this prevents unnecessary flickering)
2023-04-26made sleep voltage work on attiny1616 againSelene ToyKeeper3-6/+31
(oops, it has no "ADC Noise Reduction" mode... needs different setup code)
2023-04-25put RGB aux LEDs in high mode for 3 seconds after light goes to sleepSelene ToyKeeper2-2/+4
(much easier to see the voltage this way, including post-turbo sag)
2023-04-25fixed bug behind K93_LOCKOUT_KLUDGE which could exit lockout in solid aux modeSelene ToyKeeper15-40/+16
(also reduced avg standby power by about 15 uA) (also fixed oscillating voltage mode colors, I think) The bug happened because sometimes sleep LVP would get triggered, because the ADC would read zero under some conditions. This in turn happened because the ADC needs the MCU to be at least partially awake in order to finish a measurement. So in standby mode, with the MCU only waking up very briefly to send a sleep tick and go back to sleep, the ADC required several cycles (like 375ms to 625ms) to finish a single measurement. This varied depending on how many instructions the MCU executed while it was awake. In the single-color mode, so few instructions were being executed that the ADC seemed to time out and abort its measurement, returning a zero. Then a low voltage warning was sent, which knocked the light back into "Off" mode. Adding no-op instructions inside the single-color clause was sufficient to prevent the ADC from timing out, because it kept the MCU awake just barely long enough. But it was a kludge, and it still took like half a second to finish a measurement, and the measurements were noisy. It also used more power, because it required keeping the ADC powered on far too long. This fix puts the MCU into "ADC Noise Reduction" mode instead, when a voltage measurement is needed during sleep. It reduces noise to make measurements more stable... but more importantly, it lets the measurement finish in like 0.5ms instead of 500ms. So it uses less power and isn't dependent on the number of calculations the MCU does during each "sleep tick". As a bonus, this can also measure voltage much more often, while still using less total energy than before. It was once every 8 seconds, and now it's once per second. Avg power use in aux low mode, on a D4Sv2: (avg of 30k samples each) - before: 101 uA - after: 86 uA
2023-04-25updated D4Sv2-tintramp -> Emisar 2-channel build target ...Selene ToyKeeper3-13/+127
... and reworked how gradual_tick() works ... and updated LT1S Pro to use new method
2023-04-19added stepped tint rampingSelene ToyKeeper9-52/+227
patch adapted from SammysHP: https://github.com/SammysHP/flashlight-firmware/commit/0df174a6f6cc2676703f55a9b86eb3d9b3896b33
2023-04-19LT1S Pro: added white-only auto-tint mode, at gchart's requestSelene ToyKeeper1-6/+8
2023-04-17made "Ramp 3H" do momentary turbo if current channel mode has no argsSelene ToyKeeper3-16/+29
2023-04-17LT1S Pro: raised the ramp a bit; it seemed too low in the middleSelene ToyKeeper1-2/+9
2023-04-17switched the rest of FSM + Anduril to use SPDX license headersSelene ToyKeeper131-1319/+534
instead of full GPL headers (or all too often, nothing at all) There are a few "FIXME" entries where I'm not sure about the correct copyright.
2023-04-16reduced ROM by ~600 bytes by moving all eeprom config values to a "cfg" structSelene ToyKeeper28-596/+572
(this also made some parts of the code cleaner)
2023-04-15added ability to use 2 colors in config modeSelene ToyKeeper3-49/+46
2023-04-15enable sunset timer in Extended Simple UISelene ToyKeeper1-1/+1
2023-04-15adapted smooth-sunset patch from SammysHPSelene ToyKeeper4-95/+41
https://github.com/SammysHP/flashlight-firmware/tree/smooth-sunset https://github.com/SammysHP/flashlight-firmware/compare/anduril2...smooth-sunset (also shortened file headers, as long as I was touching those files)
2023-04-15LT1S Pro: added manual memory with a timer by default, like on SP10 ProSelene ToyKeeper1-0/+6
2023-04-15merged gcharts config updates for BLF Q8 t1616Selene ToyKeeper1-2/+11
2023-04-15added gchart's Extended Simple UI (strobes and aux config in simple mode)Selene ToyKeeper2-36/+81
2023-04-15LT1S Pro: reduced visibility of PWM by dropping the TOP values fasterSelene ToyKeeper1-9/+7
(and reduced mid-ramp "stall" behavior) The red channel seems to behave a little better too, when PWM is limited to 9 kHz or so instead of 10 kHz. It really starts spazzing out at even 10.1 kHz, 1% above its spec, and behaves nicer at 9 kHz or below.
2023-04-14LT1S: added thermal regulationSelene ToyKeeper3-39/+51
... and a bunch of gradual_tick functions ... and abstracted out some of the tint calculations ... and moved some UI settings into cfg.h
2023-04-14LT1S Pro: after measuring, perhaps low aux mode is better after allSelene ToyKeeper1-2/+10
2023-04-14LT1S Pro: added dynamic PWM (much better low modes!)Selene ToyKeeper3-20/+22
2023-04-13refactor progress checkpoint ... got Sofirn LT1S Pro and Emisar D4v2 workingSelene ToyKeeper26-443/+811
with the new channel mode system ... but there's a lot more left to do
2023-04-07merging gchart's changes, part 1...Selene ToyKeeper10-0/+309
+ added Sofirn LT1S Pro + added Sofirn SC21 Pro + added Wurkkos TS10 + added Wurkkos TS25 * small changes to other models * improved dual voltage support + added attiny1616 flashing python script w/ pymcuprog These changes are incomplete. It does not yet include: - extended simple UI - t1616 WDT reset detection - gchart's OUTPUT_MUX code (I plan to rewrite the entire tint system)
2023-03-28added a "tactical mode" on "Off -> 6C"Selene ToyKeeper23-4/+239
Tactical Mode is similar to Momentary Mode or Lockout Mode, but it has three mode slots which are independent of other config values. The default is a classic tactical setup with "high, low, strobe", each with immediate activation as soon as the button is pressed. Each slot can be a regular ramp level 1 to 150, or a strobe-group mode. To exit, press 6C or loosen/tighten the tailcap. Aux LEDs follow the same pattern as Lockout Mode. To configure, use 7H. There are 3 options, one for each slot. Enter a number 1 to 150 for a ramp mode, 0 for current strobe, or 151+ for a specific strobe mode.
2023-03-28strobe modes: added 4C to cycle backward through strobesSelene ToyKeeper1-0/+6
2023-03-28just whitespace / commentsSelene ToyKeeper3-4/+4