aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Temperature is 14.1 now, now 13.2. Divide by 2 instead of 4 before display.Selene ToyKeeper2017-10-061-1/+1
|
* Use either full or quarter speed in nice delays, based on output level.Selene ToyKeeper2017-10-011-1/+19
| | | | | | This fixes issues with some blinky modes being audible (particularly biking and lightning modes), without sacrificing the power savings for other blinkies (like beacon and battcheck).
* Made dual-switch startup optionally go to moon if e-switch is held.Selene ToyKeeper2017-09-291-1/+6
|
* Added option to start at memorized level, for momentary use on dual-switch ↵Selene ToyKeeper2017-09-293-5/+49
| | | | | | | lights. Renamed WL versions of eeprom functions, for naming consistency.
* Make sure hold-from-off ramps up, not down.Selene ToyKeeper2017-09-281-0/+3
|
* Added reversing to Anduril. Made EV_tick always send 0 while in "hold" state.Selene ToyKeeper2017-09-282-5/+40
| | | | | Reversing is a build-time option.
* Rearranged some build options and made sure the build still works if some ↵Selene ToyKeeper2017-09-282-11/+32
| | | | are turned off.
* Fixed issue where double-click-from-off followed by ↵Selene ToyKeeper2017-09-281-1/+0
| | | | double-click-to-true-turbo would overwrite memory with the ceiling level.
* Fleshed out options to blink at floor, ceiling, and channel boundaries.Selene ToyKeeper2017-09-281-18/+32
|
* Adjusted bike flasher floor and ceiling:Selene ToyKeeper2017-09-281-3/+4
| | | | | | - floor high enough to make sure it always blinks - ceiling can be higher than halfway up the ramp
* Er, set the clock speed *before* going idle, not after. :)Selene ToyKeeper2017-09-261-3/+4
|
* Added dynamic underclocking to FSM, instead of doing it manually in Anduril.Selene ToyKeeper2017-09-266-24/+63
|
* Fixed moon in lockout state. Was too low since the MCU wasn't underclocked.Selene ToyKeeper2017-09-261-2/+3
|
* Dropped moon power another 0.5 mA.Selene ToyKeeper2017-09-251-5/+11
| | | | | Fixed clock speed related brightness glitch when turning on at moon mode.
* Moved halfspeed thing so it'll affect goodnight mode too.Selene ToyKeeper2017-09-241-10/+9
|
* Reduced standby power by 700X by turning off brownout detection.Selene ToyKeeper2017-09-241-1/+1
| | | | | (from 24.7 uA to 0.35 uA)
* Cut moon power from ~4mA to ~2.5mA by running clock at half speed on very ↵Selene ToyKeeper2017-09-243-4/+37
| | | | | | | | | 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.
* Added idle to goodnight mode, for 2mA less power at all levels.Selene ToyKeeper2017-09-241-6/+11
| | | | | Reduced ROM size slightly by avoiding repeated access to the volatile current_state var.
* Removed unused code from first idle_mode(); experiment.Selene ToyKeeper2017-09-243-25/+1
|
* Added idle_mode() for slightly lower power use without turning off any ↵Selene ToyKeeper2017-09-244-3/+54
| | | | | | | | regular functions. (PWM, ADC, WDT all still enabled; only useful in moon mode) Changed default ceilings in Anduril FW3A config.
* Forgot to include a copy of the GPL before.Selene ToyKeeper2017-09-221-0/+674
| | | | | It's in other parts of the repo, but it should be in the FSM dir too.
* Updated the FSM docs a bit, for things added or changed since the last time ↵Selene ToyKeeper2017-09-221-0/+58
| | | | I touched the docs.
* Added anduril UI diagram.Selene ToyKeeper2017-09-222-0/+3428
|
* Updated Meteor UI to use provided go_to_standby. Started on UI3, but it's ↵Selene ToyKeeper2017-09-221-12/+74
| | | | | | | not really working yet. Needs some underlying plumbing changes first, adding support for medium-length clicks.
* Slightly increased resolution of VOLTAGE_FUDGE_FACTOR.Selene ToyKeeper2017-09-222-3/+4
| | | | | | My lights seemed to measure just a bit low, so hopefully this will help. It bumps up reported values by 0.05V.
* Added FW3A driver support to FSM and Anduril.Selene ToyKeeper2017-09-223-20/+73
| | | | | | Made lightning storm mode look a bit more like real lightning. Minor refactoring on how single-option config modes save state.
* Fixed a bug in gradual_tick(), I think.Selene ToyKeeper2017-09-102-3/+4
| | | | | | | | | | 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
* Applied recent changes to UI description text.Selene ToyKeeper2017-09-101-7/+16
|
* Moved strobes from 5 clicks to "click, click, long-click".Selene ToyKeeper2017-09-102-8/+28
| | | | | Moved momentary mode from 6 clicks to 5 clicks.
* Adjusted thermal regulation based on results of some handheld runtime tests.Selene ToyKeeper2017-09-101-2/+2
| | | | | | It was bouncing before, and now it's not. (cut response magnitude in half, increased width of null zone)
* Made thermal regulation slightly more prediction-heavy, less noisy at stable ↵Selene ToyKeeper2017-09-101-8/+11
| | | | | | | | | | | state, and slightly smaller. Added a bit of overflow protection since I think I saw it overflow with the prediction weight increased. Uses immediate temperature (instead of avg) for lowpass reset, to make it less noisy at stable state. (more trigger-happy reset switch biases it toward inaction) Avoid using volatile var, to reduce space. Overflow prevention also caps the maximum adjustment step, which should slightly help prevent overshooting the target.
* Rewrote gradual_tick(). Is smaller, better, and safer now.Selene ToyKeeper2017-09-092-118/+30
| | | | | Decreased gradual adjustment speed again to make thermal regulation less stair-stepped.
* Reworked thermal regulation.Selene ToyKeeper2017-09-093-31/+60
| | | | | | | | | | | | | | | | Now actually works on turbo (was previously emitting "temp low" instead of "temp high" while in direct-drive, probably due to an overflow). Made stepdown work based on an average of the last few temperature predictions instead of just the most recent one. (reduced noise sensitivity) Made each temperature sample based on 8 measurements instead of 4, to reduce noise. Made standby mode re-init thermal measurement arrays, to avoid weird behavior next time light is used. Reduced fixed-point precision to avoid overflows. Reduced prediction strength to encourage stepping down faster while hot. (unfortunately also steps down later, I think, if it wasn't already hot) Not totally happy with new algorithm, but it's the least crappy of a whole bunch of things I tried. (for example, a PID approach with correction based mostly on I... didn't work very well) (taking an average of the last few predictions is very similar though, and works) (but the result is still kind of meh) Saving this so I'll have a functional base next time I try to improve it.
* Made thermal regulation adjust smoothly (1 PWM step at a time) to make ↵Selene ToyKeeper2017-09-093-4/+190
| | | | | | | | | | | 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)
* Made "off" mode more vigilant about staying off.Selene ToyKeeper2017-09-092-4/+16
|
* Added momentary(ish) moon mode to lockout state.Selene ToyKeeper2017-09-051-4/+24
| | | | | Made LVP step down in smaller steps.
* Got the 4th PWM channel to work, ish. (channel 4 is inverted though)Selene ToyKeeper2017-09-0313-86/+91
| | | | | | | | | 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.
* Added UI2. UI2 is weird.Selene ToyKeeper2017-09-011-5/+86
| | | | | Not sure I got everything the same; will have to try UI2 on my actual Meteor to see how it works.
* Started a Meteor M43 clone UI.Selene ToyKeeper2017-08-314-1/+587
| | | | | | | So far, UI1 and battcheck both work. UI2 and UI3 and other blinkies aren't implement yet. Added 6-bar battcheck style to match Meteor (ish). Increased maximum number of clicks to 12, because WTF. If your UI needs 12 clicks, what are you even doing in life?
* Reorganized FSM files, one dir per UI.Selene ToyKeeper2017-08-308-1/+2
|
* Added a simpler and more accurate Baton UI clone.Selene ToyKeeper2017-08-301-0/+202
| | | | | Basically, took out the party strobe and added a lockout mode instead.
* Replaced FSM_*_LAYOUT with FSM_*_DRIVER because I think it makes more sense.Selene ToyKeeper2017-08-307-16/+21
| | | | | | Made momentary.c compile again. Updated fsm-main to use whichever delay function is available.
* Updated anduril.txt to match current code.Selene ToyKeeper2017-08-301-12/+16
|
* Made event handling a bit more reliable while asleep.Selene ToyKeeper2017-08-301-1/+3
| | | | | (was sometimes having difficulty getting out of soft lockout mode)
* Added goodnight mode. Rearranged blinkies in battcheck group.Selene ToyKeeper2017-08-281-11/+58
|
* Forgot to update the UI text file for lightning storm mode.Selene ToyKeeper2017-08-281-2/+7
|
* Added lightning storm mode.Selene ToyKeeper2017-08-281-6/+70
|
* just ideas and minor cleanupSelene ToyKeeper2017-08-282-3/+16
|
* Adjusted default ramp values for general-purpose use.Selene ToyKeeper2017-08-281-3/+3
|
* Fixed a crash when user presses the button more times than the UI supports.Selene ToyKeeper2017-08-281-1/+1
| | | | | (need to leave room for a trailing 0 in the array, oops)