Keith Packard [Mon, 25 May 2015 00:28:07 +0000 (17:28 -0700)]
altos: Only set CMAC RSSI value on valid packet received
This ignores spurious packets for the purpose of showing the RSSI
value in telelco/telefire, avoiding warning about 'low RSSI' when the
radio receives noise.
Keith Packard [Mon, 25 May 2015 00:25:25 +0000 (17:25 -0700)]
telefire: Make 'good' RSSI value configurable
Different radios will have different 'good' RSSI values, so let each
product configure it, leaving the default set to -90dBm, which is
a solid signal value for the CC1111.
Keith Packard [Tue, 19 May 2015 17:14:43 +0000 (10:14 -0700)]
ao-dump-up: Add --wait option to make testing µPusb easier
The --wait option hangs around until a suitable device appears, so
that you can test a pile of µPusb devices without needing to
constantly interact with the command line.
Keith Packard [Tue, 19 May 2015 17:09:22 +0000 (10:09 -0700)]
altoslib: Expose locale and non-locale floating point parsing functions
UI bits use locale-specific floating point formats, so parsing those
needs to use the locale. Network-based data, like .kml bits need to
use non-locale-specific parsing code, so now we've got both APIs
available, and each used as appropriate.
Keith Packard [Tue, 28 Apr 2015 05:29:45 +0000 (22:29 -0700)]
altosdroid: Fix tab label height problems
With a newer android API versions, we can set the indicator to a View
instead of just a string. This lets us wrap the desired string in a
TextView and show just that for the indicator, making it exactly the
right size.
Keith Packard [Sun, 29 Mar 2015 19:08:42 +0000 (12:08 -0700)]
icon: Convert windows stub into launcher program
Instead of an empty windows stub that exists only to hold icons, add
useful code that allows it to find and run the related java
application. This also adds more resources to that application to
provide more information to Windows too.
Keith Packard [Fri, 20 Mar 2015 22:09:20 +0000 (15:09 -0700)]
altos/stmf0: Have fast ADC ring buffer code use wrap-around
Instead of requiring that the whole set of returned values fit
precisely in the ring, allow for wrap-around so that we can fetch an
odd number of ADC values. The previous version required that the fetch
amount always be a factor of the ADC buffer size.
Keith Packard [Tue, 10 Mar 2015 15:34:01 +0000 (09:34 -0600)]
altos/test: Support old telemega eeprom file formats in ao_flight_test
The old eeprom format used different stoarge for the accel calibration
data, which doesn't matter to this code, but the change in the format
value does.
Keith Packard [Sat, 7 Mar 2015 18:18:57 +0000 (10:18 -0800)]
altosdroid: Deal with bluetooth connection failures better
Remember when we've closed the bluetooth connection so that we stop
operations, including reporting connection status messages or even
starting a connection attempt.
Pass the AltosBluetooth object back in connection status messages so
that TelemetryService can tell when messages from closed objects get
delivered. There's a queue between the two, so the above fix catches
most of these instances, but not all of them.
Stick a delay during reconnect -- if the TeleBT device is getting
power-cycled, it will need a few seconds to reconfigure the device at
startup, if AltosDroid manages to connect during that time, the
configuration commands will be ignored.
Unlock the AltosBluetooth device while we connect so that cancel
calls will actually work.
Keith Packard [Tue, 3 Mar 2015 05:11:33 +0000 (21:11 -0800)]
altos: Wait for BT disconnect before sending command
If AltosDroid manages to connect to the BT module before we've
configured it, we won't be able to talk to it as we can't force the
module to ignore connection attempts. Wait for AltosDroid to give up
and let us configure the device. Eventually, we'll manage, if
AltosDroid's delay interval is longer than the time it takes to
configure the unit.
Keith Packard [Tue, 3 Mar 2015 05:02:31 +0000 (21:02 -0800)]
altos: Make APRS format (compressed/uncompressed) configurable
This provides a choice of compressed vs uncompressed when sending APRS
packets to deal with receivers that still do not have support for the
more useful compressed format.
Keith Packard [Tue, 17 Feb 2015 06:22:37 +0000 (22:22 -0800)]
altosdroid: Ignore automatic tab changing while activity is saved
When the activity state is saved (after onSaveInstanceState()), we
can't update the UI until the activity is restarted or restored; that
means any UI changes we make, like switching tabs, must deal with this
by allowing those changes to be ignored, using commitAllowingStateLoss
instead of commit.
Keith Packard [Tue, 17 Feb 2015 05:19:09 +0000 (21:19 -0800)]
altosdroid: Explicitly disconnect BT on termination or 'disconnect'
This adds an explicit message to the telemetry service telling it when
to stop trying to talk to the bluetooth device. Until this message is
received, the service will reconnect to the specified BT device.
That message is sent when you 'quit' the application, or when you 'disconnect'.
Keith Packard [Sun, 15 Feb 2015 07:18:38 +0000 (23:18 -0800)]
altos/cc1200: Adjust bit-sync configuration
The default bit timing adjustment mechanism allows for only a 0.2%
deviation from the programmed bit timing. I found one TeleMini device
which is beyond that tolerance as it was built with an older crystal
with more error.
Switch to the more expensive synchronization mechanism which allows up
to 2% timing error, but requires a multi-byte preamble (which we
have). This fixes packet mode nicely.
Keith Packard [Sat, 14 Feb 2015 09:13:21 +0000 (01:13 -0800)]
altosuilib: Detect pair programming by product name, not USB id
With TeleDongle, TeleBT and TeleMetrum coming in both pair- and self-
programmable versions, we can't use the USB id to tell them
apart. Instead, fetch the device name and use that instead.
Keith Packard [Sat, 14 Feb 2015 09:11:30 +0000 (01:11 -0800)]
altosui: Run all igniter status requests from non-GUI thread
Anything run from the UI thread blocks the UI entirely; the Fire
Igniters startup code to collect the number of pyro channels when
building the UI was doing that from the UI thread. Switch that around
so that the UI doesn't get built until that reply comes back, allowing
the user to see the 'connecting' dialog, and cancel it if required.
Keith Packard [Sat, 14 Feb 2015 07:51:10 +0000 (23:51 -0800)]
altos: Replace ao_alarm/ao_clear_alarm with ao_sleep_for
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.
Keith Packard [Sun, 8 Feb 2015 04:36:10 +0000 (20:36 -0800)]
altosuilib: Don't offer to graph some GPS details that TM doesn't log
When using a TM eeprom file, various minor GPS details are logged
(course, ground speed, climb rate, etc). Make sure these aren't
offered up for graphing.
Keith Packard [Sun, 8 Feb 2015 04:22:19 +0000 (20:22 -0800)]
altosuilib: Get the Eeprom download progress bar working again
The eeprom download code wasn't computing the start of each state
transition correctly, so the progress bar was snapping to the end of
the chunk for each state.
Invalid state values would snap the bar to the right side.
Landed state wasn't ever seen, so the bar would not ever fill.
Keith Packard [Sun, 8 Feb 2015 01:09:40 +0000 (17:09 -0800)]
altosuilib: Reset telemetry state after processing it
This avoids re-using stale state after switching telemetry reception
parameters around, which otherwise generates spurious entries for the
wrong frequencies in the scan results list.
Keith Packard [Sun, 8 Feb 2015 01:08:03 +0000 (17:08 -0800)]
altoslib: Drop telemetry packets processed while monitoring is disabled
A lag between the thread queuing telemetry packets and one pulling
them out can result in stale telemetry data being returned to the
reader. Fix this by dropping telemetry read while monitoring is disabled.