| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
(also, now treating smoothed ADC values as 11-bit, with the lowest 5 bits chopped off to eliminate noise)
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
samples
(because, for some reason, even though 64 samples is plenty in a test program,
it ends up being extremely erratic when used inside Anduril... and I'm not sure why)
also, use 15-bit ADC values instead of 16 bits, in the temperature logic
(to help protect against integer overflows)
... but this code still doesn't work well. It regulates down *very* fast, and then
gradually rises until the next extra-fast drop-down. :(
... also, tempcheck mode sometimes changes by 4-5 C between readouts, which is worrisome.
... and factory reset is still broken.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
(ceiling value was all wrong, and the response magnitude was way too big)
(also, temperatures here are unsigned, since freezing is about 270 in ADC units)
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
... doesn't work well, but I'm saving it so I can experiment with other methods and maybe revert back later.
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
changed so far:
- removed LVP lowpass and thermal regulation lowpass logic; it's probably redundant now
- slowed ADC deferred logic timing to 4X per second instead of 16X,
because there doesn't seem to be much reason to do it any faster
- reduced thermal event rate-limit to just 1 second, for more responsive regulation
- added "EV_temperature_okay" signal, to help stop adjustments at an appropriate time instead of going to far
- sped up sleep LVP to one measurement every 8 seconds instead of 16,
to help the aux LEDs respond to voltage changes faster
(effect on standby time is negligible)
- make sure the WDT doesn't set the ADC channel or counter... except in standby mode
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
back to 64
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
sum-of-discrete-window method
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
(keeps stable values within ~0.46 to ~0.54 range, so truncated result has no noise)
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
eliminate noise and maybe increase precision
(thermal code still needs to be rewritten though)
|
| | |/ / / / |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | |/
| | |/|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
(not complete, but far enough that it installs and runs)
New hardware support features:
- allow using PCINT other than 0 (PCINT1, PCINT2, etc)
- option to ignore voltage ADC while the button is pressed
(because my prototype shorts the voltage divider to 0 while the button is down)
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
(boost chip apparently makes power unstable for a few ms, so we have to wait before accessing eeprom)
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | | |
turn on/off for main LED output)
|
| | | |/ |
|
| | | |\
| | |/
| |/| |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | | |
- beacon mode off (suggested by Agro)
- tenclick shortcut on with thermal regulation off
|
| | | | |
|
| | | |
| | |
| | |
| | | |
of the previous attempt
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
match production units
(also made the factor configurable per build target)
|
| | | | |
|
| | | | |
|
| | | |\
| | |/
| |/| |
|
| | | | |
|
| | |\ \ |
|
| | | |\ \
| | |/ /
| |/| |
| | | | |
improvements
|
| | | | |
| | | |
| | | |
| | | | |
size! :)
|
| | | |\ \ |
|
| | | | | |
| | | | |
| | | | |
| | | | | |
purposes
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
(in a way which doesn't break backward compatibility...
... but it really needs some refactoring to reduce code duplication)
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | | |
(was 8-bit before)
|
| | | | | | |
|
| | | | | |\
| | |_|_|/
| |/| | |
| | | | | |
changes
|
| | |\ \ \ \ |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
(by enabling the PCINT slightly sooner, before setting its "handled" flag)
|
| | |\| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
- fixed occasional short/aborted frames in aux LED sleep animation
- fixed rare case of bogus voltage and/or temperature values
- fixed issue where nice_delay_ms() didn't work in setup()
- fixed theoretical possibility of extra-noisy buttons causing a hang
- fixed reboot loop which happened after any crashes
- fixed issue where button press in sleep mode could occasionally crash
(but the issue may have been created by this branch before being fixed by it)
- reduced occasional missed button events while asleep
(still seems to happen but not nearly as much)
Also does some other things:
- cleans up the ADC code significantly
- cleans up the WDT code
- adds a voltage stabilizer/lowpass option (enabled on t1634 builds)
- greatly reduces time spent per interrupt,
which might make a future PWM-DSM technique possible
- moves most interrupt-handling logic to a non-critical code path,
deferring that code until timing doesn't matter as much
- sped up button state measurements
- very slightly reduces power used in sleep mode
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
potential crashes
(even though I just fixed the only known bug which could trigger an unintentional reboot)
|