| Commit message (Collapse) | Author | Age |
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of waiting for a while after the transition to decide if it
has stuck, signal the event right away and then ignore other
transitions for the debounce interval.
This seems to work just as reliably, but has the benefit of
eliminating button latency at press time.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Having arbitrary alarms firing in the middle of complicated device
logic makes no sense at all. Therefore only correct use of ao_alarm
and ao_clear_alarm was around a specific ao_sleep call, with correct
recovery in case the alarm fires.
This patch replaces all uses of ao_alarm/ao_sleep/ao_clear_alarm with
ao_sleep_for, a new function which takes the alarm timeout directly.
A few cases which weren't simply calling ao_sleep have been reworked
to pass the timeout value down to the place where sleep *is* being
called, and having that code deal with the return correctly.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This lets us set the rate to a lower value to improve range. 9600 baud
works great; 2400 baud makes the initial search take a long time.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This should make sure they get recompiled when boot stuff changes.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Debouncing per-pin means we don't lose transitions, which makes
counting a lot more precise.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set the timer to 200Hz for a 5ms debounce interval. Then, simply look
for transitions ending in both bits in the encoder being off, which
indicates the the encoder is resting in a detent. If bit '2' is
turning off, the encoder was rotated clockwise, otherwise the encoder
was rotated counter clockwise.
This is a lot more reliable, although still not perfect.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
A timeout of 10ms is more than enough to receive a query packet, but
if we miss it during device discovery, it's a pain, so retry 5 times
to make sure we find everyone.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Unused variables, mismatching signed/unsigned and a few other misc
warnings.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
The .ihx version can be processed by the java loader
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This stops exposing eeprom as 'storage' and instead exposes it with a
separate eeprom API so that it can be used for config storage without
also using it for flight log storage.
The config code has been changed to allow it to either use storage for
configuration data or eeprom.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Switch over to the installed pdclib everywhere
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This gives the remote boxes time to get back to listening for messages
after receiving the packet from the found box.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This splits the fast-timer portion out of the debounce helper code and
shares that with the quadrature driver which now uses it directly.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
The top LEDs are now used for signal strength; a red LED indicates
failed communcations, so we don't need to blink stuff and annoy the user.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Ignore ao_product.h and built binaries
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Signed-off-by: Keith Packard <keithp@keithp.com>
|