- 07 Mar, 2020 6 commits
-
-
Sven Greiner authored
Thus effectively double PWM frequency to about 4 kHz. With 1/256 PWM this is way too fast for the AMC7135. :(
-
Sven Greiner authored
It doesn't make lot of sense as it is not much lower than the normal low, but requires 14 bytes of flash. It also conflicted with the strobe mode. A similar mode can be achieved by setting "start on low".
-
Sven Greiner authored
Looks and feels great, but requires 20 bytes of flash!
-
Sven Greiner authored
We can go down to 1 with our slow PWM.
-
Sven Greiner authored
-
Sven Greiner authored
This is simpler than using the PWM overflow handler, prepares for power saving and allows us to use different PWM frequencies without other modifications.
-
- 15 Jul, 2019 3 commits
-
-
Sven Greiner authored
-
Sven Greiner authored
-
Sven Greiner authored
It is now also used for moonlight mode.
-
- 14 Jul, 2019 1 commit
-
-
Sven Greiner authored
Currently only 1s and 2s interval
-
- 07 Jul, 2019 10 commits
-
-
Sven Greiner authored
Extends the strobe mode. If options.moonlight is set and options.strobe is not, then the light will turn on alway in moonlight and after a single tap it will continue with the default mode. At least with the development board there is no visibly huge difference in output, so this should be considered WIP.
-
Sven Greiner authored
This saves a lot of flash.
-
Sven Greiner authored
-
Sven Greiner authored
The previous level was too bright in dark environment. The new level is currently shared with other uses and thus saves two bytes of flash.
-
Sven Greiner authored
This saves 12 bytes of flash.
-
Sven Greiner authored
-
Sven Greiner authored
-
Sven Greiner authored
-
Sven Greiner authored
-
Sven Greiner authored
-
- 16 Jan, 2019 2 commits
-
-
Sven Greiner authored
-
Sven Greiner authored
Quickly measured with bench power supply.
-
- 10 Jan, 2019 1 commit
-
-
Sven Greiner authored
-
- 08 Jan, 2019 2 commits
-
-
Sven Greiner authored
-
Sven Greiner authored
This saves 8 byte.
-
- 07 Jan, 2019 8 commits
-
-
Sven Greiner authored
If we assume that the config case in the switch statement is reached before the user can tap a second time [1] there is no need to handle overflow of fast_presses in a separate if statement. Instead it is enough to set fast_presses to the current value minus one so that when a possible next press of the power switch increments the counter again this results in the same case. This saves 6 bytes of flash. [1] Which is unlikely because the execution time until this point is much shorter than human repetitive finger movement, so only button bouncing can be an issue and that would require other measures
-
Sven Greiner authored
If users want a strobe mode, they usually want it for defence purposes. Thus it should be possible to enter it as fast as possible. If strobe is enabled (first option if STROBE is compiled) the flashlight always starts in a strobe mode. Then a single press of the power switch enters the usual UI.
-
Sven Greiner authored
TIMSK0 is outside of lower 32 I/O registers and thus cannot be set via sbi. This saves 4 bytes of flash.
-
Sven Greiner authored
-
Sven Greiner authored
Set a flag in the interrupt handler instead of checking the current tick value. Requires additional 14 bytes of flash...
-
Sven Greiner authored
Now we use registers in the function call area. But we don't use any functions with many arguments, so this is not a problem and saves 56 bytes.
-
Sven Greiner authored
Costs 8 bytes of flash.
-
Sven Greiner authored
-
- 05 Jan, 2019 4 commits
-
-
Sven Greiner authored
Check fast_presses and state only once. Allows more deterministic transitions, but introduces a goto and increases flash size by 14 bytes.
-
Sven Greiner authored
Move common actions out of mode specific handler. Removes redundant code, but might not provide the same level of flexibility as before and might reduce readability. Saves 2 bytes of flash.
-
Sven Greiner authored
Just to make sure. We have enough free RAM at the moment.
-
Sven Greiner authored
-
- 01 Jan, 2019 2 commits
-
-
Sven Greiner authored
-
Sven Greiner authored
toggle_options() preserves the value of options if it returns. The compiler did not optimize the intermediate variable because it doesn't know that fact. This saves 4 bytes.
-
- 28 Dec, 2018 1 commit
-
-
Sven Greiner authored
Also make some tiny improvements to the Makefile related to fuses.
-