| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
|
|
| |
check, version check)
Press 3C in batt check mode to change the blink channel.
Also fixed TS10 stepped ramp ceiling value.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
also, don't blink at top of linear range
|
| | |
|
| |
|
|
|
|
| |
(also tweaked D4v2 build to match KR4 as much as possible)
(also added Extended Simple UI to Hank's config)
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
| |
(also added generic channel modes for RGB aux LEDs)
|
| |
|
|
| |
post-off period
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
(was easy since it just uses the generic Emisar-2ch build
with a couple small overrides)
|
| | |
|
| |
|
|
|
|
|
|
| |
(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)
|
| |
|
|
|
| |
(oops, it has no "ADC Noise Reduction" mode... needs different setup code)
|
| |
|
|
|
| |
(much easier to see the voltage this way, including post-turbo sag)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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
|
| |
|
|
|
|
| |
... and reworked how gradual_tick() works
... and updated LT1S Pro to use new method
|
| |
|
|
|
|
| |
patch adapted from SammysHP:
https://github.com/SammysHP/flashlight-firmware/commit/0df174a6f6cc2676703f55a9b86eb3d9b3896b33
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
(this also made some parts of the code cleaner)
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
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)
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
(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.
|
| |
|
|
|
|
|
| |
... and a bunch of gradual_tick functions
... and abstracted out some of the tint calculations
... and moved some UI settings into cfg.h
|
| | |
|
| | |
|
| |
|
|
|
| |
with the new channel mode system ... but there's a lot more left to do
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
+ 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)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
3.3V and up: normal aux LED modes
2.9V to 3.3V: fast blink
under 2.9V: off
(only on lights with no RGB aux)
|
| |
|
|
|
| |
and other devices which use a voltage divider
(it was 0.1V per step, and is now 0.05V per step)
|
| |
|
|
|
|
|
|
|
|
|
| |
(new D1v2 comes in both flavors, and it's easier for everyone if
they can use the same firmware)
Also, removed lockout-abort bug on D1v2 (and DM11, I think).
Hopefully some day I'll have time to update to a newer compiler,
and then hopefully it won't have this issue any more... but for now,
it still uses a kludge to trick the compiler into working.
|
| | |
|