aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster (follow)
Commit message (Collapse)AuthorAgeFilesLines
* D4v2 FET+1 model: works again, and now uses dynamic PWM (lower lows)Selene ToyKeeper2023-04-283-18/+72
| | | | | (also added generic channel modes for RGB aux LEDs)
* RGB aux: always preview in high mode, and show voltage during 3-second ↵Selene ToyKeeper2023-04-281-4/+7
| | | | post-off period
* changed lockout RGB aux default to blinking voltage, instead of blinking discoSelene ToyKeeper2023-04-281-1/+2
|
* only use 2-color strobe in tactical mode if it's on main LEDs, not auxSelene ToyKeeper2023-04-281-1/+4
|
* tactical mode: use police strobe by default, if it existsSelene ToyKeeper2023-04-271-2/+6
|
* Noctigon KR4-tintramp updated to use new channel systemSelene ToyKeeper2023-04-271-4/+4
| | | | | | (was easy since it just uses the generic Emisar-2ch build with a couple small overrides)
* whitespace cleanupSelene ToyKeeper2023-04-261-5/+5
|
* change channel mode per config step in channel mode menuSelene ToyKeeper2023-04-264-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)
* made sleep voltage work on attiny1616 againSelene ToyKeeper2023-04-263-6/+31
| | | | | (oops, it has no "ADC Noise Reduction" mode... needs different setup code)
* put RGB aux LEDs in high mode for 3 seconds after light goes to sleepSelene ToyKeeper2023-04-252-2/+4
| | | | | (much easier to see the voltage this way, including post-turbo sag)
* fixed bug behind K93_LOCKOUT_KLUDGE which could exit lockout in solid aux modeSelene ToyKeeper2023-04-2515-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
* updated D4Sv2-tintramp -> Emisar 2-channel build target ...Selene ToyKeeper2023-04-253-13/+127
| | | | | | ... and reworked how gradual_tick() works ... and updated LT1S Pro to use new method
* added stepped tint rampingSelene ToyKeeper2023-04-199-52/+227
| | | | | | patch adapted from SammysHP: https://github.com/SammysHP/flashlight-firmware/commit/0df174a6f6cc2676703f55a9b86eb3d9b3896b33
* LT1S Pro: added white-only auto-tint mode, at gchart's requestSelene ToyKeeper2023-04-191-6/+8
|
* made "Ramp 3H" do momentary turbo if current channel mode has no argsSelene ToyKeeper2023-04-173-16/+29
|
* LT1S Pro: raised the ramp a bit; it seemed too low in the middleSelene ToyKeeper2023-04-171-2/+9
|
* switched the rest of FSM + Anduril to use SPDX license headersSelene ToyKeeper2023-04-17131-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.
* reduced ROM by ~600 bytes by moving all eeprom config values to a "cfg" structSelene ToyKeeper2023-04-1628-596/+572
| | | | | (this also made some parts of the code cleaner)
* added ability to use 2 colors in config modeSelene ToyKeeper2023-04-153-49/+46
|
* enable sunset timer in Extended Simple UISelene ToyKeeper2023-04-151-1/+1
|
* adapted smooth-sunset patch from SammysHPSelene ToyKeeper2023-04-154-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)
* LT1S Pro: added manual memory with a timer by default, like on SP10 ProSelene ToyKeeper2023-04-151-0/+6
|
* merged gcharts config updates for BLF Q8 t1616Selene ToyKeeper2023-04-151-2/+11
|
* added gchart's Extended Simple UI (strobes and aux config in simple mode)Selene ToyKeeper2023-04-152-36/+81
|
* LT1S Pro: reduced visibility of PWM by dropping the TOP values fasterSelene ToyKeeper2023-04-151-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.
* LT1S: added thermal regulationSelene ToyKeeper2023-04-143-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
* LT1S Pro: after measuring, perhaps low aux mode is better after allSelene ToyKeeper2023-04-141-2/+10
|
* LT1S Pro: added dynamic PWM (much better low modes!)Selene ToyKeeper2023-04-143-20/+22
|
* refactor progress checkpoint ... got Sofirn LT1S Pro and Emisar D4v2 workingSelene ToyKeeper2023-04-1326-443/+811
| | | | | with the new channel mode system ... but there's a lot more left to do
* merging gchart's changes, part 1...Selene ToyKeeper2023-04-0710-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)
* added a "tactical mode" on "Off -> 6C"Selene ToyKeeper2023-03-2823-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.
* strobe modes: added 4C to cycle backward through strobesSelene ToyKeeper2023-03-281-0/+6
|
* just whitespace / commentsSelene ToyKeeper2023-03-283-4/+4
|
* fast-blink the aux LED in standby when battery is lowSelene ToyKeeper2023-02-105-34/+54
| | | | | | | | 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)
* fixed voltage calibration resolution on SP10 ProSelene ToyKeeper2022-10-211-2/+2
| | | | | and other devices which use a voltage divider (it was 0.1V per step, and is now 0.05V per step)
* allow supporting single-color and RGB side button in the same buildSelene ToyKeeper2022-07-297-12/+46
| | | | | | | | | | | (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.
* added Emisar D1v2 models (old FET+7135, new linear+FET, new linear-only)Selene ToyKeeper2022-07-294-6/+52
|
* sp10-pro: hard reset phase while turning off, fixes shutoff bug without a delaySelene ToyKeeper2022-04-141-8/+17
| | | | | (also, made phase hacks individually selectable)
* moved fuses from cfg to hwdef, renamed LED_EN/DISABLE_DELAY to LED_ON/OFF_DELAYSelene ToyKeeper2022-04-142-32/+22
| | | | | (also really should rename LED_* to CH1_* and LED2_* to CH2_*)
* merged gchart's latest changes:Selene ToyKeeper2022-04-144-1/+92
|\ | | | | | | | | | | | | | | | | - sp10-pro shutoff fix - mt35-mini support - power channel enable/disable timing delays (though I wouldn't recommend doing 80ms like the thefreeman code does, since that's more than one WDT cycle (16ms))
| * Created LED_DISABLE_DELAY option and enabled it for SP10 Pro to hopefully ↵Gabriel Hart2022-04-132-1/+5
| | | | | | | | eliminate flashes when turning off at certain levels
| * Added FUSES section to SP10 Pro for building ELF file with BOD Active fuse ↵Gabriel Hart2022-04-122-4/+16
| | | | | | | | setting
| * Merge from TK's main A2 branch thru Rev 647 which includes several patches ↵Gabriel Hart2022-04-1133-108/+635
| |\ | |/ |/| | | for the Sofirn SP10 Pro after TK merge that branch in
* | revert spurious change to version.hSelene ToyKeeper2022-04-091-1/+4
| | | | | | | | | | (forgot to revert it after build test, before merge commit)
* | merged sofirn sp10-pro branch (should have done it months ago, but forgot)Selene ToyKeeper2022-04-0915-45/+191
|\ \
| * \ merged anduril2 branch for upstream changesSelene ToyKeeper2021-12-1615-6/+272
| |\ \
| * | | enabled manual memory and timer by default;Selene ToyKeeper2021-11-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | reset to ~6 lm (level 50/150) after being off for 10 minutes This sets the factory-reset default settings and affects Simple UI, so it will likely need confirmation from Sofirn.
| * | | increased SP10 PWM speed as much as possible without making ramp bumpy, and ↵Selene ToyKeeper2021-11-133-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | made party strobe pulses much faster Reduced max PWM TOP to 3072, because 2048 wasn't enough and 4096 was more than necessary. Also, Ch1 lumens / 256 / ch2 lumens = 6, so 256 * 6 * 2 is the lowest value which allows ch1 to start at half of ch2's power. I tried 1536 initially, but it made the ramp visibly malformed at the channel boundary. However, 3072 seems about right. Implemented a non-linear PWM_TOP ramp-down in level_calc, to allow it to converge faster and reduce the number of levels with visible pulses. Added an option to keep the regulator chips on between strobe pulses, by keeping the LEDs at moon instead of turning completely off. This allows the SP10 party strobe to use much shorter, more consistent pulses.
| * | | reduced SP10 firefly/moon power usage slightly, by keeping CPU underclocked ↵Selene ToyKeeper2021-11-061-1/+1
| | | | | | | | | | | | | | | | more until ch2 activates
| * | | reduced SP10 downward ramp flicker even moreSelene ToyKeeper2021-11-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | (reduced PWM_TOP minimum timing window to 32 cpu cycles, to allow TOP value of 64 to work better)