Keith Packard [Fri, 13 May 2016 02:13:05 +0000 (19:13 -0700)]
altoslib: Store common frequencies in library version-independent form
Serializable Objects in java are very specific to the class being
serialized. As we bump the name of the library on a regular basis to
note API/ABI issues, this mean a saved a Serializable object in
the preferences database will fail to load across library version
upgrades.
The saved tracker state and saved common frequencies were the only
objects saved in this form; this patch adds infrastructure for writing
objects in a version-independent form, and then adds support for
saving frequencies in that form.
Keith Packard [Fri, 13 May 2016 02:10:19 +0000 (19:10 -0700)]
altosui/telegps/micropeak: Handle both MULTI_LIB and non-MULTI_LIB builds
On x86 systems with -m32 and -m64 compilers, both libaltos32.so and
libaltos64.so are built. Otherwise, we should use libaltos.so
altosui only dealt with libaltos32.so and libaltos64.so, so it only
worked on MULTI_LIB systems. telegps and micropeak only used
libaltos.so, so they wouldn't work correctly on multi-lib systems.
Keith Packard [Wed, 11 May 2016 06:04:23 +0000 (23:04 -0700)]
altosuilib: Don't flicker missing voltages when changing units
For some reason, a value of MISSING -1 was getting used, which caused
displays to light up briefly with a weird value when switching between
metric and imperial units.
Keith Packard [Thu, 5 May 2016 09:25:52 +0000 (02:25 -0700)]
altoslib: Fix map preloading callbacks, run in separate thread
The map storage and tile callbacks were muddled together. Create
clearly separate states for map data and have status updates be
delivered when registering for new status events so that registration
is sufficient to track the state without an explicit call to get the
current state.
Run the map tile creation in a separate thread so that even checking
status of files on disk runs out of the UI thread.
These fixes serve to make the pacifier update more smoothly, and also
not over/under count tile loading so that the loading actually
completes when all of the tiles are loaded.
Keith Packard [Thu, 5 May 2016 06:56:44 +0000 (23:56 -0700)]
micropeak: Change order of windows install so that java detect works
I have no idea why this matters, but if you run the FTDI script before
trying to detect java, then the javaw.exe program isn't found and java
detection fails.
Keith Packard [Mon, 2 May 2016 23:19:39 +0000 (16:19 -0700)]
altos: Make sure AO_MMA655X_INVERT is declared where needed
Add #define AO_MMA655X_INVERT 0 to existing products which didn't
declare it at all. This will make sure the value is set correctly for
each new board.
Keith Packard [Mon, 2 May 2016 23:13:53 +0000 (16:13 -0700)]
altoslib: Deal with TeleMetrum v2.0 MMA6555 being inverted
Dumping the MMA655X data with the 'A' command provides the raw sensor
value. On TM v2.0 boards, the sensor is inverted, and all of the
firmware uses the inverted value except for the 'dump the raw data'
command. As a result, MonitorIdle was using the un-inverted value and
displaying mystic values.
I've fixed this in the ground station code by checking the product
name and conditionally inverting the value (4095 - value) for
TeleMetrum v2.0 products. Unknown products will generate a warning
dialog on AltosUI so we'll catch places where we've failed to add a
new product name.
Keith Packard [Sun, 1 May 2016 01:37:05 +0000 (18:37 -0700)]
altoslib: Flush during set_state. Don't store listener state.
The listener state wasn't used anyways, so don't bother storing
it. Also, flush the state during set_state, which actually causes the
state to be written out.
Keith Packard [Mon, 25 Apr 2016 22:50:58 +0000 (18:50 -0400)]
altos: Clear packet queue when starting packet master
This avoids overfilling the packet buffer when
disconnected. Applications using packet mode shouldn't expect that
output be saved across master sessions.
Keith Packard [Mon, 25 Apr 2016 22:48:47 +0000 (18:48 -0400)]
altos/stm32l: Add support for software-driven HW flow control
This allows applications to request that the flow control bits be
driven from software rather than hardware, permitting more flexible
pin configuration.
OSX and Windows cannot handle files with names differing only by
case. When these files are present in either there's a constant
unfixable change viewable in git status and git diff.
Since this code can be run and compiled on both platforms
names different only by case should be avoided.
Signed-off-by: Justin Vreeland <vreeland.justin@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
Keith Packard [Wed, 13 Apr 2016 13:11:44 +0000 (06:11 -0700)]
altos/stmf0: Fix external interrupts
Missing a reserved address in the registers broke everything nicely,
but the priority values were also wrong - stm32f0 exposes 8 bits per
priority, like the stm32l, but it uses only the top two bits.
Keith Packard [Wed, 6 Apr 2016 06:45:52 +0000 (23:45 -0700)]
altos/telelcotwo: Add idle timeout
Puts TeleLCOTwo in a low power state (drawing about 80µA) after a
timeout (default two minutes) to keep from killing the battery if the
device is left turned on.
Keith Packard [Sat, 26 Dec 2015 04:46:40 +0000 (20:46 -0800)]
altos: Use simpler debounce logic for buttons
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.
The LCO interface is likely to end up very device specific as the
interactions depends on the input devices. Here's a version for
TeleLCOTwo, which has two arming switches and a firing button.
Keith Packard [Tue, 22 Dec 2015 05:47:10 +0000 (21:47 -0800)]
altos: Allow for pad boxes with different sensor configurations
This allows for a pad box without a resistor from power to each
FET. That resistor is needed to detect welded relays, but in a
solid-state system, that's not a possibility.
Keith Packard [Fri, 18 Dec 2015 03:30:35 +0000 (19:30 -0800)]
altos: Add pad support for new telefire versions
Makes the voltage divider values configurable, and allows for pyro
channels that don't have the resistors necessary to check for a stuck
relay.
Also supports STM32L processors with wider GPIO registers, and uses
the new ao_gpio_set/clr_bits functions to fire igniters rather than
cc1111-specific code.