aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/fireflies-ui/fireflies-ui.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2017-09-28Adjusted bike flasher floor and ceiling:Selene ToyKeeper1-3/+4
- floor high enough to make sure it always blinks - ceiling can be higher than halfway up the ramp
2017-09-26Er, set the clock speed *before* going idle, not after. :)Selene ToyKeeper1-3/+4
2017-09-26Added dynamic underclocking to FSM, instead of doing it manually in Anduril.Selene ToyKeeper1-24/+5
2017-09-26Fixed moon in lockout state. Was too low since the MCU wasn't underclocked.Selene ToyKeeper1-2/+3
2017-09-25Dropped moon power another 0.5 mA.Selene ToyKeeper1-5/+11
Fixed clock speed related brightness glitch when turning on at moon mode.
2017-09-24Moved halfspeed thing so it'll affect goodnight mode too.Selene ToyKeeper1-10/+9
2017-09-24Cut moon power from ~4mA to ~2.5mA by running clock at half speed on very ↵Selene ToyKeeper1-3/+30
low modes. Adjusted default FET+1 ramp to compensate for speed bump. Added define(s) for whether to blink at ramp floor/ceiling/channel edges. Lowered default moon level to 1, since slower speed makes it brighter and more stable.
2017-09-24Added idle to goodnight mode, for 2mA less power at all levels.Selene ToyKeeper1-6/+11
Reduced ROM size slightly by avoiding repeated access to the volatile current_state var.
2017-09-24Removed unused code from first idle_mode(); experiment.Selene ToyKeeper1-3/+0
2017-09-24Added idle_mode() for slightly lower power use without turning off any ↵Selene ToyKeeper1-1/+16
regular functions. (PWM, ADC, WDT all still enabled; only useful in moon mode) Changed default ceilings in Anduril FW3A config.
2017-09-22Added FW3A driver support to FSM and Anduril.Selene ToyKeeper1-14/+30
Made lightning storm mode look a bit more like real lightning. Minor refactoring on how single-option config modes save state.
2017-09-10Fixed a bug in gradual_tick(), I think.Selene ToyKeeper1-1/+0
It was off by one, and caused actual_level to be off by one, which caused other parts of the code to do weird things... - end-of-ramp blink would happen repeatedly. - ramping up went slower (or not at all, with gradual_tick on each tick) - would sometimes trigger underheating code at moon level, and then glide up to the minimum regulation floor
2017-09-10Moved strobes from 5 clicks to "click, click, long-click".Selene ToyKeeper1-8/+7
Moved momentary mode from 6 clicks to 5 clicks.
2017-09-09Rewrote gradual_tick(). Is smaller, better, and safer now.Selene ToyKeeper1-2/+2
Decreased gradual adjustment speed again to make thermal regulation less stair-stepped.
2017-09-09Made thermal regulation adjust smoothly (1 PWM step at a time) to make ↵Selene ToyKeeper1-4/+37
adjustments less noticeable. Added set_level_gradually() and gradual_tick() to ramping lib. Not terribly happy with it yet, but it at least works in practice. Added extra thermal regulation checks because I was running into stupid behavior in edge cases. Increased lowest thermal stepdown level to MAX_LEVEL/3 because it was going down way too low before. (is still pretty low, but not quite as bad)
2017-09-09Made "off" mode more vigilant about staying off.Selene ToyKeeper1-1/+16
2017-09-05Added momentary(ish) moon mode to lockout state.Selene ToyKeeper1-4/+24
Made LVP step down in smaller steps.
2017-09-03Got the 4th PWM channel to work, ish. (channel 4 is inverted though)Selene ToyKeeper1-12/+1
Moved go_to_suspend thing into main() instead of making each UI handle that during loop(). Made default_state() optional. Fixed bug where battcheck and other number readouts could interfere with the state which interrupted them. (they would sometimes turn the LED off after the new state had already started) Updated darkhorse's moon levels to match new ramp on D4 hardware.
2017-08-30Reorganized FSM files, one dir per UI.Selene ToyKeeper1-0/+0
2017-08-30Replaced FSM_*_LAYOUT with FSM_*_DRIVER because I think it makes more sense.Selene ToyKeeper1-1/+1
Made momentary.c compile again. Updated fsm-main to use whichever delay function is available.
2017-08-28Added goodnight mode. Rearranged blinkies in battcheck group.Selene ToyKeeper1-11/+58
2017-08-28Added lightning storm mode.Selene ToyKeeper1-6/+70
2017-08-28just ideas and minor cleanupSelene ToyKeeper1-1/+7
2017-08-28Adjusted default ramp values for general-purpose use.Selene ToyKeeper1-3/+3
2017-08-28Added thermal config mode... but I'm not sure if it's the right UI for this ↵Selene ToyKeeper1-2/+39
or not.
2017-08-28Added beacon mode and beacon config mode.Selene ToyKeeper1-4/+79
Renamed ramp_config_mode to ramp_config_state.
2017-08-27Use different speed values for party and tactical strobes.Selene ToyKeeper1-11/+13
2017-08-27Fixed bug: double-click from off didn't *really* go to the top of the ramp.Selene ToyKeeper1-1/+1
2017-08-27Remembered to put the thermal ceiling back at a sane value.Selene ToyKeeper1-1/+1
UI idea updates.
2017-08-27Added bike flasher.Selene ToyKeeper1-17/+54
2017-08-27Now remembers ramp and strobe settings after battery change.Selene ToyKeeper1-18/+47
Also, set new defaults for ramping: - ~50% power maximum - 0.3 lm min for smooth ramping, 10 lm min for discrete ramping
2017-08-27Made ramp config mode significantly easier to use.Selene ToyKeeper1-46/+43
Added delays around each step. Fixed wrong number of blinks for each option.
2017-08-27Ramp config mode actually works now...Selene ToyKeeper1-7/+174
Added EV_reenter_state event to indicate an obscuring state was popped off the stack and the underlying one is now on top again.
2017-08-27Reduced ROM size, simplified logic, made sure discrete ramp won't overflow ↵Selene ToyKeeper1-53/+27
outside uint8_t range.
2017-08-27Made discrete ramping to work significantly better.Selene ToyKeeper1-19/+80
Added momentary mode. Can only be exited by disconnecting power. Rearranged some mappings from off to other states.
2017-08-27Started on Anduril, a Narsil-inspired UI.Selene ToyKeeper1-29/+133
2017-08-26Added a temperature check mode to ramping-ui, mostly for testing purposes.Selene ToyKeeper1-0/+19
2017-08-25Made 4bar and 8bar battcheck styles work.Selene ToyKeeper1-0/+4
Added LVP handling for other modes, including battcheck.
2017-08-25Added battcheck mode to ramping-ui. It's bigger than I had hoped. :(Selene ToyKeeper1-3/+37
Added fsm-misc.*, which currently only has interruptible blink functions in it. (for blinking out numbers and such)
2017-08-24Started on some documentation, spaghetti-monster.txt.Selene ToyKeeper1-30/+30
Added #defines for State return values: EVENT_HANDLED, EVENT_NOT_HANDLED Improved handling of delay includes. Managed mischief.
2017-08-24Added loop() to API, executes constantly.Selene ToyKeeper1-30/+47
Added nice_delay_ms() to process events while waiting, and abort on state change. Converted ramping-ui strobe to smoothly variable with party and tactical modes.
2017-08-24Fixed repeating blinks at ends of ramp -- only blinks once now.Selene ToyKeeper1-4/+10
2017-08-24Set default brightness to max 7135 level.Selene ToyKeeper1-9/+16
Made thermal regulation adjust proportional to how far above/below the target range the light is. Replaced turn-on blinks with single shorter/dimmer blip.
2017-08-24Made ramping UI able to toggle between smooth and discrete ramping with 4 ↵Selene ToyKeeper1-5/+27
clicks.
2017-08-24Added a ramping UI example.Selene ToyKeeper1-31/+55
Added ramping support in general.
2017-08-23Added thermal regulation to SpaghettiMonster / Baton.Selene ToyKeeper1-1/+35
Made some LVP values configurable. Removed high_temperature() / low_temperature() shortcuts for now.
2017-08-23Made Baton a little easier to read:Selene ToyKeeper1-12/+13
Renamed set_mode() to set_level(). Replaced sizeof() thingy with a MAX_LEVEL define.
2017-08-23Added LVP to Baton UI. Was super easy.Selene ToyKeeper1-1/+13
2017-08-19Added missing returns, made strobe-from-off use memorized strobe speed,Selene ToyKeeper1-2/+5
set initial brightness to ~10lm after battery change.
2017-08-19Baton: Strobe should be full-power.Selene ToyKeeper1-3/+3